public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Jason Baron <jbaron@akamai.com>,
	linux-kernel@vger.kernel.org,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	Salman Qazi <sqazi@google.com>, Hou Tao <houtao1@huawei.com>
Subject: Re: [PATCH] epoll: remove ep_call_nested() from ep_eventpoll_poll()
Date: Wed, 1 Nov 2017 13:53:54 -0700	[thread overview]
Message-ID: <20171101135354.1ffec54e1fdedcca0f2086ce@linux-foundation.org> (raw)
In-Reply-To: <20171031145821.ieflhlvs3la25vdw@linux-n805>

On Tue, 31 Oct 2017 07:58:21 -0700 Davidlohr Bueso <dave@stgolabs.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?

  reply	other threads:[~2017-11-01 20:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31  6:10 [PATCH] epoll: remove ep_call_nested() from ep_eventpoll_poll() Jason Baron
2017-10-31 14:58 ` Davidlohr Bueso
2017-11-01 20:53   ` Andrew Morton [this message]
2017-11-01 21:07     ` Davidlohr Bueso
2017-11-01 21:11       ` Davidlohr Bueso
2017-11-02  1:24     ` Jason Baron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171101135354.1ffec54e1fdedcca0f2086ce@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=dave@stgolabs.net \
    --cc=houtao1@huawei.com \
    --cc=jbaron@akamai.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sqazi@google.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox