[nfsv4] 答复: Draft is updated following your comments, Thanks//答复: draft-mzhang-nfsv4-sequence-id-calibration-01

"yangjing (U)" <yangjing8@huawei.com> Fri, 21 April 2023 03:08 UTC

Return-Path: <yangjing8@huawei.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 37ED0C152DB4 for <nfsv4@ietfa.amsl.com>; Thu, 20 Apr 2023 20:08:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.896
X-Spam-Level:
X-Spam-Status: No, score=-1.896 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KSOoTZSbjO30 for <nfsv4@ietfa.amsl.com>; Thu, 20 Apr 2023 20:08:50 -0700 (PDT)
Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2EC06C152DA8 for <nfsv4@ietf.org>; Thu, 20 Apr 2023 20:08:50 -0700 (PDT)
Received: from lhrpeml500003.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Q2fbF0Cm6z67ZCl for <nfsv4@ietf.org>; Fri, 21 Apr 2023 11:07:37 +0800 (CST)
Received: from kwepemi500014.china.huawei.com (7.221.188.232) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 21 Apr 2023 04:08:46 +0100
Received: from kwepemi500014.china.huawei.com (7.221.188.232) by kwepemi500014.china.huawei.com (7.221.188.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Fri, 21 Apr 2023 11:08:44 +0800
Received: from kwepemi500014.china.huawei.com ([7.221.188.232]) by kwepemi500014.china.huawei.com ([7.221.188.232]) with mapi id 15.01.2507.023; Fri, 21 Apr 2023 11:08:44 +0800
From: "yangjing (U)" <yangjing8@huawei.com>
To: Rick Macklem <rick.macklem@gmail.com>
CC: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: [nfsv4] Draft is updated following your comments, Thanks//答复: draft-mzhang-nfsv4-sequence-id-calibration-01
Thread-Index: Adlrdv8o4J6qb1jcQoy+CNAfWT26KAALyr8AAAF/tIAAAMDTgAAHljeAAgchPOA=
Date: Fri, 21 Apr 2023 03:08:44 +0000
Message-ID: <30a502ce7a90469196140b69b91f2867@huawei.com>
References: <83389b42bb0f49509c757cdabd5c6b3f@huawei.com> <CAM5tNy7F9Yf8rJQqy4rOwtcK_FSa+SuRsG=9KenB=mG9Wqv6MA@mail.gmail.com> <CAM5tNy56P0XxrDU==hjocvtBuY9DO2JrOn8PThyfBxRorbW74g@mail.gmail.com> <CAM5tNy6=3JRZTZZH5NW=QHocTd1DOS9HSav+PXnVC=N0_xduxA@mail.gmail.com> <CAM5tNy6x75sprE2Zqkxu5QE3wBFysuOUKj056Uyj9fqHPbkLbg@mail.gmail.com>
In-Reply-To: <CAM5tNy6x75sprE2Zqkxu5QE3wBFysuOUKj056Uyj9fqHPbkLbg@mail.gmail.com>
Accept-Language: zh-CN, en-US
Content-Language: zh-CN
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.110.46.233]
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-CFilter-Loop: Reflected
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/6SMGVDc-fV5Hqt4jU7gCkOhSJUQ>
Subject: [nfsv4] 答复: Draft is updated following your comments, Thanks//答复: draft-mzhang-nfsv4-sequence-id-calibration-01
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Apr 2023 03:08:54 -0000

Hi Rick, Thanks for your comments and sorry for the late response ^_^


On Mon, Apr 10, 2023 at 2:20 PM Rick Macklem <rick.macklem@gmail.com> wrote:
>
> On Mon, Apr 10, 2023 at 1:58 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> >
> > On Mon, Apr 10, 2023 at 1:15 PM Rick Macklem <rick.macklem@gmail.com> wrote:
> > >
> > > On Sun, Apr 9, 2023 at 11:39 PM yangjing (U) 
> > > <yangjing8=40huawei.com@dmarc.ietf.org> wrote:
> > > >
> > > > The draft is updated as 
> > > > https://www.ietf.org/archive/id/draft-mzhang-nfsv4-sequence-id-c
> > > > alibration-02.txt
> > > Here are a few generic comments about the draft (I know nothing 
> > > about detailed formatting, etc).
> > >
> > > 1 - It is my understanding that new operations can only be added 
> > > to minor version 2 and not
> > >      minor version 1.

I agree with you,  If new operations can only be added to minor version 2.

> > > 2 - I largely agree with what Tom Talpey said in his comments. I 
> > > think you need to figure out
> > >      how/when the sequenceid is getting messed up.
> > >      Note that it is my understanding that the main purpose of 
> > > sessions is to achieve
> > >      "exactly once RPC semantics" (the fact that the reply cache 
> > > is bounded in size is a nice
> > >      added feature, but not the principal purpose).
> > >      As such, a sequenceid being misordered implies that "exactly 
> > > once" semantics could
> > >      already have been broken by a software bug in the client.
> > >
> > >      You note that the misordered sequenceid could be caused by 
> > > "network partitioning".
> > >      In a correct implementation that should not be the case. 
> > > After a network partition heals,
> > >      the client should re-send all outstanding RPCs with the same 
> > > Session/slot/sequenceid
> > >      as was used in the original RPC request message. These should 
> > > succeed (no misordered
> > >      error reply) using cached replies, as required.
> > >      --> If a client's recovery from network partitioning is not 
> > > doing this, then it needs to be
> > >            fixed.
> > >      --> As above, if a misordered sequenceid error reply is due 
> > > to a client bug, then that
> > >            must be fixed, since "exactly once" semantics may already be broken.
> > > The common client bug that results in a misordered sequenceid 
> > > error reply happens when an in-progress RPC gets interrupted 
> > > before the RPC reply is processed.

You are right. Thanks for your analysis on when misordered sequenceid happens. But this draft does not care how and when it happens, the same as the protocol specification. 
We  focus on how to deal with this error.  If this error never happens, we will not define it, right? We did find that misordered sequenceid happens and IO performance is affected
because session is reestablished, but we are not sure why and how it happens, because no packages are being captured at that moment.

> > > This is not a case
> > > where your suggested extension should be used, since the 
> > > in-progress RPC may still be "in-progress". Although I am not sure 
> > > there is a 100% correct way for a client to handle the need to 
> > > interrupt an in-progress RPC, marking the session slot as broken 
> > > and no longer using it is the best approach I am aware of. (I 
> > > suspect you might be referring to the Linux client and I cannot 
> > > comment on how it handles interruption via signals or timeouts for 
> > > session slots, since I am not a Linux client implementor.)

Yes, when we find IO performance is affected, we check Linux client code, find that client will drop the session, then we check the NFS protocol specification....
I don’t think marking the session slot as broken is the best way. What is next? 
First: Leaving the slot broken. On one hand, with more and more slots broken, concurrency 
of this  session will decline, On another hand, Is new mechanism needed to maintain and notify slot status between client and server?
Second: Recover the broken slot. That is what this draft is trying to do, I think. 

> > >
> > > It sounds like migration might be an exception to the above, but 
> > > it should be addressed specifically (as Tom Talpey notes).

For migration scenario, we will analyze it later

> > >
> > > 3 - If your extension were used by a client, how would the client 
> > > know whether or not
> > >      there are still RPC(s) in-progress that have been assigned 
> > > that session/slot/sequenceid?
> > An additional comment:
> > - If the client knows that the outstanding RPC request on the
> >   session/slot/sequenceid that got a misordered error reply
> >   is one where "exactly once" semantics is not required,
> >   then I can see that the client implementor might be able to
> >    safely resynchronize the sequenceid.
>Oops again. It would be the outstanding RPC request for which no reply has been received that causes the sequenceid to be misordered and that is the RPC that cannot require "exactly once" semantics.

>rick
> >   To do this, I do not think your extensions are needed.
> >    If the client issues an RPC that consists of only the
> >    Sequence operation repeatedly, with the sequenceid incremented
> >    by one each attempt after waiting for a reply to the previous
> >    attempt, it should get NFS_OK within a few attempts.

The misordered sequenceid is not known. If the cached sequenceid is N, any value beyond N+1 and N will be identified as misordered. The range of sequenceid is (1, 2^32 - 1).
So, I don’t think attempting repeatedly is a better choice.

> >    Then the correct sequenceid to be used for the session/slot is known.
> Oops, "known" is probably too strong a word here. Since the cause of 
> the misordered sequenceid is not known, I think there is a very low 
> probability that an RPC using the session/slot is still in flight and 
> will change the sequenceid when processed on the server, causing 
> another misordered sequenceid error reply.
>

I agree with you on "There may be still RPC(s) in-progress that have been assigned that session/slot/sequenceid" when misorder reply getting the client, 
I will update the draft to specify that client should wait for replies for all flying requests, then query correct sequenceid.


> rick
>
> >
> > rick
> >
> > >
> > > rick
> > >
> > > > _______________________________________________
> > > > nfsv4 mailing list
> > > > nfsv4@ietf.org
> > > > https://www.ietf.org/mailman/listinfo/nfsv4


Thank you Rick

Best Regards
Jing