From: Abel Wu <wuyun.abel@bytedance.com>
To: Mel Gorman <mgorman@suse.de>
Cc: Peter Zijlstra <peterz@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Josh Don <joshdon@google.com>, Chen Yu <yu.c.chen@intel.com>,
Yicong Yang <yangyicong@huawei.com>,
linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH v2 5/5] sched/fair: cleanup for SIS_PROP
Date: Fri, 2 Sep 2022 11:28:21 +0800 [thread overview]
Message-ID: <ea3a4260-6fd1-032d-d84a-2973886fcda4@bytedance.com> (raw)
In-Reply-To: <20220901140311.xi3y72uxdwbpxzrq@suse.de>
On 9/1/22 10:03 PM, Mel Gorman Wrote:
> On Thu, Sep 01, 2022 at 09:11:07PM +0800, Abel Wu wrote:
>> The sched-domain of this cpu is only used when SIS_PROP is enabled,
>> and it should be irrelevant whether the local sd_llc is valid or
>> not, since all we care about is target sd_llc if !SIS_PROP.
>>
>> Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
>
> This could conceivably result in an uninitialised memory access if
> SIS_PROP was enabled while select_idle_cpu is running. I'm not sure if
> it can happen when jump labels are in use but I think it could happen
> for !CONFIG_JUMP_LABEL updating the sysctl_sched_features bitmap updated
> via sysctl.
Nice catch!
>
> The patch is still a good idea because it moves an unlikely rcu_deference
> out of the default path for sched features but either this_sd needs to
> be initialised to NULL and checked or the this_sd lookup needs to happen
> twice at a slight additional cost to the default-disabled SIS_PROP path.
>
I'd prefer the former.
Thanks & BR,
Abel
next prev parent reply other threads:[~2022-09-02 3:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 13:11 [PATCH v2 1/5] sched/fair: remove redundant check in select_idle_smt Abel Wu
2022-09-01 13:11 ` [PATCH v2 2/5] sched/fair: avoid double search on same cpu Abel Wu
2022-09-01 13:11 ` [PATCH v2 3/5] sched/fair: remove useless check in select_idle_core Abel Wu
2022-09-01 13:11 ` [PATCH v2 4/5] sched/fair: default to false in test_idle_cores Abel Wu
2022-09-01 13:11 ` [PATCH v2 5/5] sched/fair: cleanup for SIS_PROP Abel Wu
2022-09-01 14:03 ` Mel Gorman
2022-09-02 3:28 ` Abel Wu [this message]
2022-09-07 7:59 ` Abel Wu
2022-09-07 8:51 ` Mel Gorman
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=ea3a4260-6fd1-032d-d84a-2973886fcda4@bytedance.com \
--to=wuyun.abel@bytedance.com \
--cc=joshdon@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=peterz@infradead.org \
--cc=vincent.guittot@linaro.org \
--cc=yangyicong@huawei.com \
--cc=yu.c.chen@intel.com \
/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®