[lkml]   [2006]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [take24 0/6] kevent: Generic event handling mechanism.
On Tue, Nov 21, 2006 at 11:33:39PM -0800, Ulrich Drepper ( wrote:
> Evgeniy Polyakov wrote:
> >Threads are parked in syscalls - which one should be interrupted?
> It doesn't matter, use the same policy you use when waking a thread in
> case of an event. This is not about waking a specific thread, it's
> about not dropping the event notification.
> >And what if there were no threads waiting in syscalls?
> This is fine, do nothing. It means that the other threads are about to
> read the ring buffer and will pick up the event.
> The case which must be avoided is that of all threads being in the
> kernel, one threads gets woken, and then is canceled. Without notifying
> the kernel about the cancellation and in the absence of further events
> notifications the process is deadlocked.
> A second case which should be avoided is that there is a thread waiting
> when a thread gets canceled and there are one or more addition threads
> around, but not in the kernel. But those other threads might not get to
> the ring buffer anytime soon, so handling the event is unnecessarily
> delayed.

Ok, to solve the problem in the way which should be good for both I
decided to implement additional syscall which will allow to mark any
event as ready and thus wake up appropriate threads. If userspace will
request zero events to be marked as ready, syscall will just
interrupt/wakeup one of the listeners parked in syscall.


Evgeniy Polyakov
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-11-22 13:13    [W:0.113 / U:11.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site