Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Steve Dickson <SteveD@redhat.com>, Neil Brown <neilb@suse.de>,
	Phil Endecott
	<phil_bnaqb_endecott-wZDNlLIRyE5g9hUCZPvPmw@public.gmane.org>,
	linux-nfs@vger.kernel.org
Subject: Re: Make sm-notify faster if there are no servers to notify
Date: Thu, 11 Dec 2008 17:44:59 -0500	[thread overview]
Message-ID: <20081211224459.GC24584@fieldses.org> (raw)
In-Reply-To: <CADDDF36-C41E-4171-905B-CD48CB7BCFED@oracle.com>

On Mon, Dec 08, 2008 at 02:50:39PM -0500, Chuck Lever wrote:
> Hi Bruce-
>
> On Dec 5, 2008, at Dec 5, 2008, 9:42 PM, J. Bruce Fields wrote:
>> On Fri, Dec 05, 2008 at 01:41:32PM -0500, Chuck Lever wrote:
>>> On Dec 5, 2008, at 12:29 PM, J. Bruce Fields wrote:
>>>> How about adding an explicit fsync() of the state file (and parent
>>>> directory) to statd's first succesful creation of a statd record,
>>>> together with a comment explaining this?  So around about line 194  
>>>> in
>>>> utils/statd/monitor.c:sm_mon_1_svc()?
>>>>
>>>> In fact, we could delete the sync entirely and do the same before  
>>>> the
>>>> first notification, and then we wouldn't have to wait for the sync  
>>>> in
>>>> the case host records are present either....  (statd would, but
>>>> perhaps we could still get other work done in the mean time).
>>>>
>>>> (Am I missing something?)
>>>
>>> This all might work, but I think we're adding a lot of complexity as 
>>> a
>>> workaround.
>>
>> I think you mean the justification is too subtle--the code itself  
>> (just
>> a couple syncs or fsyncs) is pretty simple.
>
> Let me state it another way.  Your suggested redesign makes assumptions 
> about the order in which these operations are performed.  Can the code 
> provide any guarantee that this ordering is always true?  This may have 
> been feasible when rpc.statd did notification too, but these are now two 
> separate programs.  Can you think of a way of implementing this where the 
> ordering dependencies are coded instead of commented?

The existing code requires that we update the on-disk nsm state number
before doing notification or accepting statd calls.  That's the only
ordering I'd require.

Maybe I should try to write a patch.

--b.

>
> It would be significantly less fragile (ie immune to ordering problems  
> and long-term changes to system start-up and nfs-utils code) and simpler 
> to understand if sm-notify does whatever syncing it needs, and rpc.statd 
> does whatever syncing it needs.
>
> All I'm saying is this scheme may be easy to break by accident, and any 
> future problem here is probably not going to show up until someone  
> really needs this to work right.
>
>>> Someone should fix the real problem, which is the
>>> implementation of sync().
>>
>> I think you mean of fsync().  My understanding of past discussions on
>> the issue is that it's not really fixable on ext3, at least.  So
>> default setups will have this problem for a while.
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com

  reply	other threads:[~2008-12-11 22:45 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  0:13 Make sm-notify faster if there are no servers to notify Phil Endecott
     [not found] ` <1225239200402-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:18   ` J. Bruce Fields
2008-10-29 17:30     ` Phil Endecott
     [not found]       ` <1225301403729-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 17:37         ` J. Bruce Fields
2008-10-29 17:45           ` Phil Endecott
     [not found]             ` <1225302305994-YnoLgZYwwYuCbKHnblo0pmrPP3OPMK55cpQHUIT47Ck@public.gmane.org>
2008-10-29 18:41               ` J. Bruce Fields
2008-10-29 20:30                 ` Chuck Lever
2008-10-29 21:11                   ` J. Bruce Fields
2008-11-09 19:25                     ` J. Bruce Fields
2008-11-10  0:52                       ` Chuck Lever
2008-11-10  0:55                         ` J. Bruce Fields
2008-11-10  1:00                           ` Chuck Lever
2008-11-10  9:40                         ` Phil Endecott
2008-11-10 13:41                     ` Steve Dickson
     [not found]                       ` <49183A12.7010707-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-04 21:10                         ` J. Bruce Fields
2008-12-05  3:34                           ` Neil Brown
     [not found]                             ` <18744.41310.635618.148281-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2008-12-05  3:58                               ` J. Bruce Fields
2008-12-05 13:26                                 ` Steve Dickson
     [not found]                                   ` <49392C14.7000709-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-05 16:38                                     ` J. Bruce Fields
2008-12-05 17:29                                       ` J. Bruce Fields
2008-12-05 18:41                                         ` Chuck Lever
2008-12-06  2:42                                           ` J. Bruce Fields
2008-12-08 19:50                                             ` Chuck Lever
2008-12-11 22:44                                               ` J. Bruce Fields [this message]
2008-12-05 19:12                                         ` Steve Dickson
     [not found]                                           ` <49397D1B.3000701-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  2:49                                             ` J. Bruce Fields
2008-12-05 18:42                                       ` Steve Dickson
     [not found]                                         ` <4939760A.9050304-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-06  3:08                                           ` J. Bruce Fields
2008-10-31 17:52           ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081211224459.GC24584@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=SteveD@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=phil_bnaqb_endecott-wZDNlLIRyE5g9hUCZPvPmw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox