From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: dnotify/inotify and vfs questions Date: Thu, 25 Aug 2005 16:07:25 +0100 Message-ID: <1124982445.17190.44.camel@icampbell-debian> References: <20050823130023.GB8305@diku.dk> <20050823152331.GA10486@mail.shareable.org> <1124973618.17190.9.camel@icampbell-debian> <20050825145750.GA6658@mail.shareable.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-cifs-client@lists.samba.org, linux-kernel@vger.kernel.org Return-path: To: Jamie Lokier In-Reply-To: <20050825145750.GA6658@mail.shareable.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cifs-client-bounces+glfc-linux-cifs-client=gmane.org@lists.samba.org Errors-To: linux-cifs-client-bounces+glfc-linux-cifs-client=gmane.org@lists.samba.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2005-08-25 at 15:57 +0100, Jamie Lokier wrote: > Ian Campbell wrote: > > On Tue, 2005-08-23 at 16:23 +0100, Jamie Lokier wrote: > > > ... > > > if (any_dnotify_or_inotify_events_pending) { > > > read_dnotify_or_inotify_events(); > > > if (any_events_related_to(file)) { > > > store_in_userspace_stat_cache(file, stat(file)); > > > } > > > } > > > stat_info = lookup_userspace_stat_cache(file); > > > > > > Now that's a silly way to save one system call in the fast path by itself. > > > > I'm not that familiar with inotify internals but doesn't > > read_dnotify_or_inotify_events() or > > any_dnotify_or_inotify_events_pending() involve a syscall? > > The fast path is just any_dnotify_or_inotify_events_pending: there > aren't any relevant events pending in the fast path. [snip] > As I explained in the previous mail, all this is absolutely pointless > to save one system call. It's a lot of work for negligable gain. > > The point is when it saves lots of calls and userspace logic together, > for things like web page templates and compiled programs, which depend > on many files which can be revalidated in a small number of operations. Thanks for the explaination. Ian. -- Ian Campbell Current Noise: Iron Maiden - Prodigal Son Fay: The British police force used to be run by men of integrity. Truscott: That is a mistake which has been rectified. -- Joe Orton, "Loot"