Re: dnotify/inotify and vfs questions

From: Ian Campbell
Date: Thu Aug 25 2005 - 10:08:02 EST


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:
> > > <receive some request>...
> > > 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"

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/