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] [day] [month] [year] [list]
Date:   Wed, 1 Nov 2017 21:24:04 -0400
From:   Jason Baron <jbaron@...mai.com>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Davidlohr Bueso <dave@...olabs.net>
Cc:     linux-kernel@...r.kernel.org,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Salman Qazi <sqazi@...gle.com>, Hou Tao <houtao1@...wei.com>
Subject: Re: [PATCH] epoll: remove ep_call_nested() from ep_eventpoll_poll()



On 11/01/2017 04:53 PM, Andrew Morton wrote:
> On Tue, 31 Oct 2017 07:58:21 -0700 Davidlohr Bueso <dave@...olabs.net> wrote:
> 
>> On Tue, 31 Oct 2017, Jason Baron wrote:
>>
>>> The use of ep_call_nested() in ep_eventpoll_poll(), which is the .poll
>>> routine for an epoll fd, is used to prevent excessively deep epoll
>>> nesting, and to prevent circular paths. However, we are already preventing
>>> these conditions during EPOLL_CTL_ADD. In terms of too deep epoll chains,
>>> we do in fact allow deep nesting of the epoll fds themselves (deeper
>>> than EP_MAX_NESTS), however we don't allow more than EP_MAX_NESTS when
>>> an epoll file descriptor is actually connected to a wakeup source. Thus,
>>> we do not require the use of ep_call_nested(), since ep_eventpoll_poll(),
>>> which is called via ep_scan_ready_list() only continues nesting if there
>>> are events available. Since ep_call_nested() is implemented using a global
>>> lock, applications that make use of nested epoll can see large performance
>>> improvements with this change.
>>
>> Improvements are quite obscene actually, such as for the following epoll_wait()
>> benchmark with 2 level nesting on a 80 core IvyBridge:
>>
>> ncpus  vanilla     dirty     delta
>> 1      2447092     3028315   +23.75%
>> 4      231265      2986954   +1191.57%
>> 8      121631      2898796   +2283.27%
>> 16     59749       2902056   +4757.07%
>> 32     26837	   2326314   +8568.30%
>> 64     12926       1341281   +10276.61%
>>
>> (http://linux-scalability.org/epoll/epoll-test.c)
> 
> This is tempting, but boy it is late in the -rc cycle.
> 
> How important are these workloads?  Would the world end if we held off
> on this for 4.15?
> 

Hi Andrew,

As Davidlohr pointed out, the nested epoll case is less common and these
locks have been here for a long time. I also think the patch needs to be
in linux-next for a bit and validated more, before hitting mainline.

Thanks,

-Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ