[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [patch 3/7] epoll keyed wakeups - introduce key-aware wakeup macros
From:       wli () movementarian ! org
Date:       2009-01-31 21:28:32
Message-ID: 20090131212832.GB26410 () movementarian ! org
[Download RAW message or body]

On Fri, 30 Jan 2009, wli@movementarian.org wrote:
>> The filtered wakeup code uses some notion of a key already. There, the
>> key is to route wakeups to recipients associated with the correct
>> object. Here, the objects are known in advance. The wakeup is to give
>> them some particular message in which they may not necessarily be
>> interested. Names indicative of that (e.g. *_msg/msg_*) would clarify
>> the distinction between it and the filtered wakeup code used for pages.

On Sat, Jan 31, 2009 at 11:08:40AM -0800, Davide Libenzi wrote:
> I had thought of giving the void* some structure, besides being a cast 
> from an event mask, so that later on we'd be able to eventually embed 
> more information in the wakeup. Dunno if worth it.

kernel/wait.c uses struct wait_bit_key; void * was merely for keeping it
as private as possible, though it is exposed for the sake of macros like
DEFINE_WAIT_BIT et al. It would make little difference to the pagecache
waitqueue code if the structure were augmented, the function prototypes
changed to reflect the argument type, etc. There are a priori guarantees
based on the objects that the lists of tasks considered won't overlap,
so unrelated structures are even possible.


-- wli
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic