From: Daniel Phillips <phillips@innominate.de>
To: Jamie Lokier <lk@tantalophile.demon.co.uk>, linux-kernel@vger.kernel.org
Subject: Re: FS callback routines
Date: Wed, 10 Jan 2001 19:25:39 +0100 [thread overview]
Message-ID: <3A5CA923.4731F29@innominate.de> (raw)
In-Reply-To: <3A5A4958.CE11C79B@goingware.com> <3A5B0D0C.719E69F@innominate.de> <20010110115632.E30055@pcep-jamie.cern.ch>
Jamie Lokier wrote:
>
> Daniel Phillips wrote:
> > It was done last year, quietly and without fanfare, by Stephen Rothwell:
> >
> > http://www.linuxcare.com/about-us/os-dev/rothwell.epl
> >
> > This may be the most significant new feature in 2.4.0, as it allows us
> > to take a fundamentally different approach to many different problems.
> > Three that come to mind:
> [...]
> > mail (get your mail instantly without polling);
>
> You'll be notified if _any_ mailbox is changed in your mail directory.
> On a multiuser system that's going to be more often than a typical
> polling interval, so you'll have to revert to polling.
?? I don't get it. I'd expect a daemon to be notified and the daemon in
turn to notify me.
> > make (don't rely on timestamps to know when rebuilding is needed, don't
> > scan huge directory trees on each build)
>
> You will need to rescan the timestamps of files, but yes you can skip
> subdirectories in which no file has changed. But only if you're running
> a "make daemon" on the same box as make, and if there aren't too many
> directories.
A 'make daemon' is exactly what I was thinking of. The 'too many
directories' think is a problem, see below.
> > locate (reindex only those directories that have changed, keep index
> > database current).
>
> Not a chance. dnotify doesn't work recursively, so you can't monitor
> just a few top level directories like "/usr/lib". And have you ever
> tried to keep all 3000 directories on your filesystem directories open
> at the same time? Would you want to consume that much non-swappable
> memory, and also prevent the directories from being removed from the
> filesystem?
Yes, basic problem. The notification has to be persistent across
directory open/close. There had to be a reason why dnotify.c is just
140 lines long, right? OK, that doesn't mean 'not a chance', it just
means the current implementation is inadequate. Now at least I can
start writing programs that work this way, try them out, and think about
what has to be done to go the rest of the distance.
Another problem is not handling hard links properly. That's not ok.
> Long ago I proposed something similar that works at the disk level, is
> recursive, and the checks can be done without keeping directories open.
> But I never wrote the code :( That's interesting because it speeds up
> make without needing a daemon, and really can speed up
> locate/updatedb/find.
Yes, there are obvious flaws but it's now in and it's obvious where it's
going. A simple-minded inadequate piece of code that's working beats a
perfect one that exists purely in the imagination, any day. :-)
Do you still have your original proposal around?
--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-10 18:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-08 23:12 FS callback routines Michael D. Crawford
2001-01-09 2:37 ` Sean R. Bright
2001-01-09 3:48 ` David Weinehall
2001-01-09 13:07 ` Daniel Phillips
2001-01-10 10:56 ` Jamie Lokier
2001-01-10 18:25 ` Daniel Phillips [this message]
2001-01-11 14:30 ` Daniel Phillips
2001-01-11 15:37 ` Jamie Lokier
2001-01-11 16:11 ` Daniel Phillips
-- strict thread matches above, loose matches on Subject: below --
2001-01-09 1:21 Sean R. Bright
2001-01-09 11:22 ` Philipp Matthias Hahn
2001-01-09 11:34 ` Daniel Stodden
2001-01-09 14:05 Jesse Pollard
2001-01-09 15:41 ` Daniel Phillips
2001-01-10 10:48 ` Jamie Lokier
2001-01-10 15:18 Jesse Pollard
2001-01-11 16:39 Jesse Pollard
2001-01-11 17:53 ` Daniel Phillips
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=3A5CA923.4731F29@innominate.de \
--to=phillips@innominate.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lk@tantalophile.demon.co.uk \
/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