Re: [RFC][PATCH] inotify 0.10.0

From: Robert Love
Date: Tue Sep 28 2004 - 12:41:49 EST


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


-
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/