[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2921e66bf3a4edfaa667c32abbefebf@AcuMS.aculab.com>
Date: Sun, 3 May 2020 13:05:24 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Jason Baron' <jbaron@...mai.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Alexander Viro" <viro@...iv.linux.org.uk>, Heiher <r@....cc>,
Roman Penyaev <rpenyaev@...e.de>,
Khazhismel Kumykov <khazhy@...gle.com>,
Davidlohr Bueso <dbueso@...e.de>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH] epoll: ensure ep_poll() doesn't miss wakeup events
From: Jason Baron
> Sent: 01 May 2020 20:16
>
> Now that the ep_events_available() check is done in a lockless way, and
> we no longer perform wakeups from ep_scan_ready_list(), we need to ensure
> that either ep->rdllist has items or the overflow list is active. Prior to:
> commit 339ddb53d373 ("fs/epoll: remove unnecessary wakeups of nested
> epoll"), we did wake_up(&ep->wq) after manipulating the ep->rdllist and the
> overflow list. Thus, any waiters would observe the correct state. However,
> with that wake_up() now removed we need to be more careful to ensure that
> condition.
I'm wondering how much all this affects the (probably) more common
case of a process reading events from a lot of sockets in 'level'
mode.
Even the change to a rwlock() may have had an adverse effect
on such programs.
In 'level' mode it doesn't make any sense to have multiple
readers of the event queue.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists