Re: [RFC][PATCH] inotify 0.10.0

Robert Love
2004-09-28T17:34:14Z

On Mon, 2004-09-27 at 23:44 -0400, John McCutchan wrote:

> We need a timer to wake up any processes blocking on a read() call. The
> reason it has to be a timer is because the code paths that get run when
> an event is queued are not safe places to wake up blocked processes (But
> I a kernel amateur so I am probably wrong).

We probably don't need the timer. wake_up_interruptible() does not
sleep; we can call it from anywhere. Heck, timers are more atomic than
where we probably need to wake stuff up from anyhow.

But it is not easy to tell where that place is, because it looks like
the timer just runs every 250ms? That is no good.

I suspect that we can remove all of the timer stuff and just do

/* wake up! you are going to miss the bus! */
wake_up_interruptible(&dev->wait);

after

list_add_tail(&kevent->list, &dev->events);

in inotify_dev_queue_event().

Robert Love