From: Davidlohr Bueso <dave@stgolabs.net>
To: Jason Baron <jbaron@akamai.com>
Cc: akpm@linux-foundation.org, rpenyaev@suse.de,
linux-kernel@vger.kernel.org, normalperson@yhbt.net,
viro@zeniv.linux.org.uk
Subject: Re: [PATCH v2] fs/epoll: make nesting accounting safe for -rt kernel
Date: Tue, 17 Mar 2020 09:34:43 -0700 [thread overview]
Message-ID: <20200317163443.o5ffdpkp5t6axsl3@linux-p48b> (raw)
In-Reply-To: <1582739816-13167-1-git-send-email-jbaron@akamai.com>
On Wed, 26 Feb 2020, Jason Baron wrote:
>Davidlohr Bueso pointed out that when CONFIG_DEBUG_LOCK_ALLOC is set
>ep_poll_safewake() can take several non-raw spinlocks after disabling
>interrupts. Since a spinlock can block in the -rt kernel, we can't take a
>spinlock after disabling interrupts. So let's re-work how we determine
>the nesting level such that it plays nicely with the -rt kernel.
>
>Let's introduce a 'nests' field in struct eventpoll that records the
>current nesting level during ep_poll_callback(). Then, if we nest again we
>can find the previous struct eventpoll that we were called from and
>increase our count by 1. The 'nests' field is protected by
>ep->poll_wait.lock.
>
>I've also moved the visited field to reduce the size of struct eventpoll
>from 184 bytes to 176 bytes on x86_64 for !CONFIG_DEBUG_LOCK_ALLOC,
>which is typical for a production config.
>
>Reported-by: Davidlohr Bueso <dbueso@suse.de>
>Signed-off-by: Jason Baron <jbaron@akamai.com>
Sorry for the tardy reply. This looks good to me:
Reviewed-by: Davidlohr Bueso <dbueso@suse.de>
prev parent reply other threads:[~2020-03-17 16:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-04 20:22 [PATCH] epoll: simplify ep_poll_safewake() for CONFIG_DEBUG_LOCK_ALLOC Jason Baron
2019-09-23 15:43 ` Jason Baron
2019-09-23 19:23 ` Roman Penyaev
2019-09-24 17:34 ` Jason Baron
2019-09-24 17:52 ` Roman Penyaev
2020-01-06 19:38 ` [PATCH] fs/epoll: rework safewake " Davidlohr Bueso
2020-01-06 20:28 ` Jason Baron
2020-01-06 21:01 ` Davidlohr Bueso
2020-01-17 19:16 ` [PATCH] fs/epoll: make nesting accounting safe for -rt kernel Jason Baron
2020-02-25 0:38 ` Andrew Morton
2020-02-26 17:56 ` [PATCH v2] " Jason Baron
2020-03-17 16:34 ` Davidlohr Bueso [this message]
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=20200317163443.o5ffdpkp5t6axsl3@linux-p48b \
--to=dave@stgolabs.net \
--cc=akpm@linux-foundation.org \
--cc=jbaron@akamai.com \
--cc=linux-kernel@vger.kernel.org \
--cc=normalperson@yhbt.net \
--cc=rpenyaev@suse.de \
--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