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:	Fri, 27 Feb 2015 14:31:47 -0700
From:	Jonathan Corbet <corbet@....net>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Jason Baron <jbaron@...mai.com>, Ingo Molnar <mingo@...nel.org>,
	peterz@...radead.org, mingo@...hat.com, viro@...iv.linux.org.uk,
	normalperson@...t.net, davidel@...ilserver.org,
	mtk.manpages@...il.com, luto@...capital.net,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	linux-api@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alexander Viro <viro@....linux.org.uk>
Subject: Re: [PATCH v3 0/3] epoll: introduce round robin wakeup mode

On Fri, 27 Feb 2015 13:10:34 -0800
Andrew Morton <akpm@...ux-foundation.org> wrote:

> I don't really understand the need for rotation/round-robin.  We can
> solve the thundering herd via exclusive wakeups, but what is the point
> in choosing to wake the task which has been sleeping for the longest
> time?  Why is that better than waking the task which has been sleeping
> for the *least* time?  That's probably faster as that task's data is
> more likely to still be in cache.

So here's my chance to show the world what a fool I am (again)...  If I
understand this at all, a task woken from epoll_wait() remains on the wait
queues while it is off doing other stuff.  If you're doing exclusive
wakeups, the task at the head of the queue will get all of them, since it
never gets removed from the queue.  So you don't spread your load around,
and, indeed, you may "wake" a process that is busy doing something else and
can't deal with the event now anyway.  You need some way to shuffle up the
wait queue, and round-robin is probably as good as any.

(The alternative would be to take the process off the queue until it calls
epoll_wait() again, but that runs counter to what epoll is all about).

At least, that was my impression when I took a look at this stuff.

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