All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-cifs-client@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-cifs-client] [PATCH] cifs: wrap cifs_dnotify_thread in  CONFIG_BROKEN
Date: Thu, 22 Jan 2009 17:56:09 -0600	[thread overview]
Message-ID: <524f69650901221556q62726c9fg15d9819dca1248fe@mail.gmail.com> (raw)
In-Reply-To: <524f69650901221541x63ae3940oaaa75f12a3e2ff97@mail.gmail.com>

One of the obvious reasons that we could throw away the idea of a cifs
dnotify thread for cifs is if we could guarantee that all of the
functions in include/linux/fsnotify.h are nonblocking.  If the
fsnotify.h worker functions are nonblocking then we could safely
process all of the notify responses in cifs_demultiplex_thread (since
we wouldn't have to queue them) without clogging up response
processing for the socket.   Note that notify responses are unusual -
they don't have an application thread waiting on them ("multishot"
responses) typically (there is only one other type of SMB response
that does not have an application thread associated with it).

On Thu, Jan 22, 2009 at 5:41 PM, Steve French <smfrench@gmail.com> wrote:
> IIRC ... the original suggestion that was made and partially
> implemented a few years ago (code was disabled at runtime, not just
> wrapped in an ifdef originally) was that cifs_demultiplex_thread would
> take the incoming responses from the server for cifs multishot notify
> smbs and queue them to a dnotify queue.   The cifs dnotify thread was
> inteneded to -- only -- process the items in the dnotify queue, parse
> the response to see which of the inline worker functions (in
> include/linux/fsnotify.h e.g. fsnotify_create) ineeds to be called,
> check if we have a dnotify or inotify for the corresponding inode and
> call the generic hook (e.g. fsnotify_d_move or fsnotify_nameremove or
> fsnotify_create etc.).   Adding something like that back in would be
> easy enough and wrapping inside an ifdef ... but the people who
> understand more about inotify presumably don't know about CIFS or SMB2
> etc. so it is not likely to be implemented as one step ... but needs
> to be staged in.
>
> On Thu, Jan 22, 2009 at 5:31 PM, Jeff Layton <jlayton@redhat.com> wrote:
>> On Thu, 22 Jan 2009 17:13:37 -0600
>> Steve French <smfrench@gmail.com> wrote:
>>
>>> The thread may be renamed/rewritten etc. - but we badly need to finish
>>> the dnotify / inotify code ... removing the start on this that someone
>>> wrote in the past isn't getting us any closer to this.
>>>
>>> dnotify/inotify support was added to Linux in the first place because
>>> Samba used it to handle this common operation (it is commonly used by
>>> OTHER cifs clients) ... but none of the Linux cluster/network file
>>> systems have had time to finish the code ... we need to finish this -
>>> the network protocol portion of this is now well documented (and we
>>> presumably will need a thread to process the dnotify multishot
>>> notification responses so we don't clog up the demultiplex thread
>>> waiting on kde and gnoe)
>>>
>>
>> Removing this kthread won't measurably move us farther away from that
>> goal either.
>>
>> It's currently under CONFIG_CIFS_EXPERIMENTAL, which would be fine if
>> it actually did something. It doesn't though -- it just wakes up tasks
>> that don't need to be woken up.
>>
>> I have no issue with a kthread that does useful work, but why not remove
>> this kthread out of the mainline code for now and just plan to put it
>> back when it actually has something useful to do?
>>
>> The patch that removes it will live in perpetuity in git. It'll be a
>> trivial matter to revert it when you're ready to have the kthread do
>> real work.
>>
>> --
>> Jeff Layton <jlayton@redhat.com>
>>
>
>
>
> --
> Thanks,
>
> Steve
>



-- 
Thanks,

Steve

WARNING: multiple messages have this Message-ID (diff)
From: Steve French <smfrench@gmail.com>
To: Jeff Layton <jlayton@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-fsdevel@vger.kernel.org, linux-cifs-client@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: Re: [linux-cifs-client] [PATCH] cifs: wrap cifs_dnotify_thread in CONFIG_BROKEN
Date: Thu, 22 Jan 2009 17:56:09 -0600	[thread overview]
Message-ID: <524f69650901221556q62726c9fg15d9819dca1248fe@mail.gmail.com> (raw)
In-Reply-To: <524f69650901221541x63ae3940oaaa75f12a3e2ff97@mail.gmail.com>

One of the obvious reasons that we could throw away the idea of a cifs
dnotify thread for cifs is if we could guarantee that all of the
functions in include/linux/fsnotify.h are nonblocking.  If the
fsnotify.h worker functions are nonblocking then we could safely
process all of the notify responses in cifs_demultiplex_thread (since
we wouldn't have to queue them) without clogging up response
processing for the socket.   Note that notify responses are unusual -
they don't have an application thread waiting on them ("multishot"
responses) typically (there is only one other type of SMB response
that does not have an application thread associated with it).

On Thu, Jan 22, 2009 at 5:41 PM, Steve French <smfrench@gmail.com> wrote:
> IIRC ... the original suggestion that was made and partially
> implemented a few years ago (code was disabled at runtime, not just
> wrapped in an ifdef originally) was that cifs_demultiplex_thread would
> take the incoming responses from the server for cifs multishot notify
> smbs and queue them to a dnotify queue.   The cifs dnotify thread was
> inteneded to -- only -- process the items in the dnotify queue, parse
> the response to see which of the inline worker functions (in
> include/linux/fsnotify.h e.g. fsnotify_create) ineeds to be called,
> check if we have a dnotify or inotify for the corresponding inode and
> call the generic hook (e.g. fsnotify_d_move or fsnotify_nameremove or
> fsnotify_create etc.).   Adding something like that back in would be
> easy enough and wrapping inside an ifdef ... but the people who
> understand more about inotify presumably don't know about CIFS or SMB2
> etc. so it is not likely to be implemented as one step ... but needs
> to be staged in.
>
> On Thu, Jan 22, 2009 at 5:31 PM, Jeff Layton <jlayton@redhat.com> wrote:
>> On Thu, 22 Jan 2009 17:13:37 -0600
>> Steve French <smfrench@gmail.com> wrote:
>>
>>> The thread may be renamed/rewritten etc. - but we badly need to finish
>>> the dnotify / inotify code ... removing the start on this that someone
>>> wrote in the past isn't getting us any closer to this.
>>>
>>> dnotify/inotify support was added to Linux in the first place because
>>> Samba used it to handle this common operation (it is commonly used by
>>> OTHER cifs clients) ... but none of the Linux cluster/network file
>>> systems have had time to finish the code ... we need to finish this -
>>> the network protocol portion of this is now well documented (and we
>>> presumably will need a thread to process the dnotify multishot
>>> notification responses so we don't clog up the demultiplex thread
>>> waiting on kde and gnoe)
>>>
>>
>> Removing this kthread won't measurably move us farther away from that
>> goal either.
>>
>> It's currently under CONFIG_CIFS_EXPERIMENTAL, which would be fine if
>> it actually did something. It doesn't though -- it just wakes up tasks
>> that don't need to be woken up.
>>
>> I have no issue with a kthread that does useful work, but why not remove
>> this kthread out of the mainline code for now and just plan to put it
>> back when it actually has something useful to do?
>>
>> The patch that removes it will live in perpetuity in git. It'll be a
>> trivial matter to revert it when you're ready to have the kthread do
>> real work.
>>
>> --
>> Jeff Layton <jlayton@redhat.com>
>>
>
>
>
> --
> Thanks,
>
> Steve
>



-- 
Thanks,

Steve

  reply	other threads:[~2009-01-22 23:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 16:34 [PATCH] cifs: wrap cifs_dnotify_thread in CONFIG_BROKEN Jeff Layton
2009-01-22 21:06 ` [linux-cifs-client] " Christoph Hellwig
2009-01-22 23:13   ` Steve French
2009-01-22 23:13     ` Steve French
2009-01-22 23:31     ` Jeff Layton
2009-01-22 23:31       ` Jeff Layton
2009-01-22 23:41       ` Steve French
2009-01-22 23:41         ` Steve French
2009-01-22 23:56         ` Steve French [this message]
2009-01-22 23:56           ` Steve French
2009-01-23  1:17           ` Jeff Layton
2009-01-23  1:17             ` Jeff Layton
2009-01-23  0:13       ` [linux-cifs-client] " Christoph Hellwig

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=524f69650901221556q62726c9fg15d9819dca1248fe@mail.gmail.com \
    --to=smfrench@gmail.com \
    --cc=hch@infradead.org \
    --cc=jlayton@redhat.com \
    --cc=linux-cifs-client@lists.samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.