From: Tejun Heo <tj@kernel.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
minipli@grsecurity.net, Valentin.Schneider@arm.com,
bristot@redhat.com, bsegall@google.com, dietmar.eggemann@arm.com,
juri.lelli@redhat.com, kevin.tanguy@corp.ovh.com,
mgorman@suse.de, mingo@redhat.com, odin@uged.al,
peterz@infradead.org, rostedt@goodmis.org,
spender@grsecurity.net, vincent.guittot@linaro.org
Subject: Re: [RFC PATCH] sched/fair: Filter by css_is_dying() in the last tg_unthrottle_up()
Date: Mon, 29 Nov 2021 06:39:35 -1000 [thread overview]
Message-ID: <YaUCR4a0kes5XvF4@slm.duckdns.org> (raw)
In-Reply-To: <20211126130619.30730-1-mkoutny@suse.com>
Hello,
On Fri, Nov 26, 2021 at 02:06:19PM +0100, Michal Koutný wrote:
> As explained in the message, this relies on the RCU GP between css_is_dying()
> returning false and the potential .css_offline() call.
> This is stated in the css_is_dying() documentation:
>
> > the actual offline operations are RCU delayed and this test returns %true
> > also when @css is scheduled to be offlined.
>
> On the other hand the documentation of the underlying
> percpu_ref_kill_and_confirm() says (to discourage relying on GP):
>
> > There are no implied RCU grace periods between kill and release.
>
> This seems to discord with each other at first thought. (That's why I marked
> this RFC.)
>
> However, if one takes into account that percpu_refs as used by css are never
> switched to atomic besides the actual killing (and they start in per-cpu mode),
> the GP (inserted in __percpu_ref_switch_to_atomic()) is warranted.
IIRC, one reason why I didn't want to make the implied RCU "official" was
that there were different RCU types and cgroup was using the less common
preempt variant. Now that the RCU types are unified, it may be okay to
guarantee that e.g. percpu ref offlining has a guaranteed GP and then
propagate that guarantee to the users. It may still be a bit brittle tho in
that we may force the percpu ref to atomic mode for e.g. reference leak
debugging. It'd be great if we can trigger a warning if we end up missing a
GP for whatever reason.
Thanks.
--
tejun
prev parent reply other threads:[~2021-11-29 20:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-26 13:06 Michal Koutný
2021-11-29 11:33 ` Mathias Krause
2021-11-29 16:39 ` Tejun Heo [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=YaUCR4a0kes5XvF4@slm.duckdns.org \
--to=tj@kernel.org \
--cc=Valentin.Schneider@arm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=cgroups@vger.kernel.org \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kevin.tanguy@corp.ovh.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=minipli@grsecurity.net \
--cc=mkoutny@suse.com \
--cc=odin@uged.al \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=spender@grsecurity.net \
--cc=vincent.guittot@linaro.org \
/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
all inboxes | Powered by JetHome®