[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux 2.4 directory notification api in tail -f

From: Jim Meyering
Subject: Re: Linux 2.4 directory notification api in tail -f
Date: Sat, 15 Dec 2001 17:07:43 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.50 (i686-pc-linux-gnu)

toad <address@hidden> wrote:
> Will you accept a patch that allows tail -f to use (optionally, but by default
> if supported) the linux 2.4 dnotify API rather than polling? We can then
> achieve the effect of tail -f --sleep-interval=0 while using minimal CPU.
> This isn't written yet, but it's something I'll do (hopefully) if you say yes.

I've just read a little about dnotify in the kernel's Documentation/dnotify.txt,
e.g., http://www.linuxhq.com/kernel/v2.4/doc/dnotify.txt.html.

I was dismayed to read this:

  In order to make the impact on the file system code as small as possible,
  the problem of hard links to files has been ignored.  So if a file (x)
  exists in two directories (a and b) then a change to the file using the
  name "a/x" should be notified to a program expecting notifications on
  directory "a", but will not be notified to one expecting notifications on
  directory "b".

  Also, files that are unlinked, will still cause notifications in the
  last directory that they were linked to.

If that is indeed true, then tail will not use dnotify because
it wouldn't work as well as the current mechanism.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]