lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Jan 2009 11:08:40 -0800 (PST)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	wli@...ementarian.org
cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	Ingo Molnar <mingo@...e.hu>, David Miller <davem@...emloft.net>
Subject: Re: [patch 3/7] epoll keyed wakeups - introduce key-aware wakeup
 macros

On Fri, 30 Jan 2009, wli@...ementarian.org wrote:

> On Fri, Jan 30, 2009 at 07:49:26PM -0800, Linus Torvalds wrote:
> > But even more I dislike the notion of this being a "key". It's not. It's 
> > about poll events, nothing more. So renaming it to "_key()" in no way 
> > helps.
> > Yes, _internally_ we send that "void *key" around, and then leave it to 
> > lower levels to agree about how it is used, but at the level _you_ then 
> > use it, that is no longer the case. When you do a 
> > 	kwake_up_interruptible(&tty->write_wait, POLLOUT);
> > that has _nothing_ to do with "keys" any more. So the 'k' prefix is wrong 
> > and really odd-looking, but a '_key' postfix wouldn't be much better 
> > either. Because when you pass in POLLOUT, you're not using it as a key, 
> > you are very much using it as a poll-specific thing.
> > So the naming should match that. I suspect a '_poll' postfix (or a 'poll_' 
> > prefix would work and make sense.
> 
> 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.

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.



- Davide


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ