From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Valentin Schneider <valentin.schneider@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "mingo@kernel.org" <mingo@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"morten.rasmussen@arm.com" <morten.rasmussen@arm.com>,
"mgorman@suse.de" <mgorman@suse.de>
Subject: RE: [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for the deduplicating sort
Date: Mon, 1 Feb 2021 10:35:43 +0000 [thread overview]
Message-ID: <8b15c0fe619640808e1e26aa7c845bb9@hisilicon.com> (raw)
In-Reply-To: <6000e39e-7d28-c360-9cd6-8798fd22a9bf@arm.com>
> -----Original Message-----
> From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com]
> Sent: Monday, February 1, 2021 10:54 PM
> To: Valentin Schneider <valentin.schneider@arm.com>;
> linux-kernel@vger.kernel.org
> Cc: mingo@kernel.org; peterz@infradead.org; vincent.guittot@linaro.org;
> morten.rasmussen@arm.com; mgorman@suse.de; Song Bao Hua (Barry Song)
> <song.bao.hua@hisilicon.com>
> Subject: Re: [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for
> the deduplicating sort
>
> On 22/01/2021 13:39, Valentin Schneider wrote:
>
> [...]
>
> > @@ -1705,7 +1702,7 @@ void sched_init_numa(void)
> > /* Compute default topology size */
> > for (i = 0; sched_domain_topology[i].mask; i++);
> >
> > - tl = kzalloc((i + level + 1) *
> > + tl = kzalloc((i + nr_levels) *
> > sizeof(struct sched_domain_topology_level), GFP_KERNEL);
> > if (!tl)
> > return;
>
> This hunk creates issues during startup on my Arm64 juno board on tip/sched/core.
I also reported this kernel panic here:
https://lore.kernel.org/lkml/bfb703294b234e1e926a68fcb73dbee3@hisilicon.com/#t
>
> ---8<---
>
> From: Dietmar Eggemann <dietmar.eggemann@arm.com>
> Date: Mon, 1 Feb 2021 09:58:04 +0100
> Subject: [PATCH] sched/topology: Fix sched_domain_topology_level alloc in
> sched_init_numa
>
> Commit "sched/topology: Make sched_init_numa() use a set for the
> deduplicating sort" allocates 'i + nr_levels (level)' instead of
> 'i + nr_levels + 1' sched_domain_topology_level.
>
> This led to an Oops (on Arm64 juno with CONFIG_SCHED_DEBUG):
>
> sched_init_domains
> build_sched_domains()
> __free_domain_allocs()
> __sdt_free() {
> ...
> for_each_sd_topology(tl)
> ...
> sd = *per_cpu_ptr(sdd->sd, j); <--
> ...
> }
>
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> ---
This patch also resolved my panic. So:
Tested-by: Barry Song <song.bao.hua@hisilicon.com>
Thanks
Barry
next prev parent reply other threads:[~2021-02-01 10:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 12:39 [PATCH 0/1] sched/topology: NUMA distance deduplication Valentin Schneider
2021-01-22 12:39 ` [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for the deduplicating sort Valentin Schneider
2021-01-25 2:23 ` Song Bao Hua (Barry Song)
2021-01-25 9:26 ` Valentin Schneider
2021-01-25 16:45 ` Valentin Schneider
2021-01-25 21:35 ` Song Bao Hua (Barry Song)
2021-01-28 14:47 ` Valentin Schneider
2021-01-29 2:02 ` Song Bao Hua (Barry Song)
2021-02-01 12:03 ` Valentin Schneider
2021-02-01 9:53 ` Dietmar Eggemann
2021-02-01 10:19 ` Vincent Guittot
2021-02-01 10:35 ` Song Bao Hua (Barry Song) [this message]
2021-02-01 11:55 ` Valentin Schneider
2021-02-02 10:03 ` [tip: sched/core] sched/topology: Fix sched_domain_topology_level alloc in sched_init_numa() tip-bot2 for Dietmar Eggemann
2021-02-17 13:17 ` tip-bot2 for Dietmar Eggemann
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=8b15c0fe619640808e1e26aa7c845bb9@hisilicon.com \
--to=song.bao.hua@hisilicon.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=peterz@infradead.org \
--cc=valentin.schneider@arm.com \
--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;
as well as URLs for NNTP newsgroup(s).