All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Valentin Schneider <valentin.schneider@arm.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>
Subject: Re: [PATCH] sched/debug: Don't update sched_domain debug directories before sched_debug_init()
Date: Fri, 25 Jun 2021 12:04:32 +0200	[thread overview]
Message-ID: <YNWqMK34S29Nxy8t@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210518130725.3563132-1-valentin.schneider@arm.com>

On Tue, May 18, 2021 at 02:07:25PM +0100, Valentin Schneider wrote:
> Since CPU capacity asymmetry can stem purely from maximum frequency
> differences (e.g. Pixel 1), a rebuild of the scheduler topology can be
> issued upon loading cpufreq, see:
> 
>   arch_topology.c::init_cpu_capacity_callback()
> 
> Turns out that if this rebuild happens *before* sched_debug_init() is
> run (which is a late initcall), we end up messing up the sched_domain debug
> directory: passing a NULL parent to debugfs_create_dir() ends up creating
> the directory at the debugfs root, which in this case creates
> /sys/kernel/debug/domains (instead of /sys/kernel/debug/sched/domains).
> 
> This currently doesn't happen on asymmetric systems which use cpufreq-scpi
> or cpufreq-dt drivers, as those are loaded via
> deferred_probe_initcall() (it is also a late initcall, but appears to be
> ordered *after* sched_debug_init()).
> 
> Ionela has been working on detecting maximum frequency asymmetry via ACPI,
> and that actually happens via a *device* initcall, thus before
> sched_debug_init(), and causes the aforementionned debugfs mayhem.
> 
> One option would be to punt sched_debug_init() down to
> fs_initcall_sync(). Preventing update_sched_domain_debugfs() from running
> before sched_debug_init() appears to be the safer option.
> 
> Link: http://lore.kernel.org/r/20210514095339.12979-1-ionela.voinescu@arm.com
> Fixes: 3b87f136f8fc ("sched,debug: Convert sysctl sched_domains to debugfs")
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>

Thanks!

      reply	other threads:[~2021-06-25 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 13:07 [PATCH] sched/debug: Don't update sched_domain debug directories before sched_debug_init() Valentin Schneider
2021-06-25 10:04 ` Peter Zijlstra [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=YNWqMK34S29Nxy8t@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.