From: Valentin Schneider <vschneid@redhat.com>
To: Phil Auld <pauld@redhat.com>, linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, mingo@redhat.com,
vishalc@linux.vnet.ibm.com, peterz@infradead.org,
srikar@linux.vnet.ibm.com, sshegde@linux.ibm.com,
vincent.guittot@linaro.org, ritesh.list@gmail.com
Subject: Re: [RESEND PATCH] sched/debug: Put sched/domains files under the verbose flag
Date: Fri, 20 Jan 2023 15:52:55 +0000 [thread overview]
Message-ID: <xhsmh1qnpi4o8.mognet@vschneid.remote.csb> (raw)
In-Reply-To: <20230119150758.880189-1-pauld@redhat.com>
On 19/01/23 10:07, Phil Auld wrote:
> The debug files under sched/domains can take a long time to regenerate,
> especially when updates are done one at a time. Move these files under
> the sched verbose debug flag. Allow changes to verbose to trigger
> generation of the files. This lets a user batch the updates but still
> have the information available. The detailed topology printk messages
> are also under verbose.
>
> Discussion that lead to this approach can be found in the link below.
>
> Simplified code to maintain use of debugfs bool routines suggested by
> Michael Ellerman <mpe@ellerman.id.au>.
>
> Signed-off-by: Phil Auld <pauld@redhat.com>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Ingo Molnar <mingo@redhat.com>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
> Cc: Valentin Schneider <vschneid@redhat.com>
> Cc: Vishal Chourasia <vishalc@linux.vnet.ibm.com>
> Cc: Vincent Guittot <vincent.guittot@linaro.org>
> Link: https://lore.kernel.org/all/Y01UWQL2y2r69sBX@li-05afa54c-330e-11b2-a85c-e3f3aa0db1e9.ibm.com/
Small nits below, other than that:
Reviewed-by: Valentin Schneider <vschneid@redhat.com>
> @@ -402,15 +440,23 @@ void update_sched_domain_debugfs(void)
> if (!debugfs_sched)
> return;
>
> + if (!sched_debug_verbose)
> + return;
> +
> if (!cpumask_available(sd_sysctl_cpus)) {
> if (!alloc_cpumask_var(&sd_sysctl_cpus, GFP_KERNEL))
> return;
> cpumask_copy(sd_sysctl_cpus, cpu_possible_mask);
> }
>
> - if (!sd_dentry)
> + if (!sd_dentry) {
> sd_dentry = debugfs_create_dir("domains", debugfs_sched);
>
> + /* rebuild sd_sysclt_cpus if empty since it gets cleared below */
^^^^^^^^^^^^^^
Nit: sd_sysctl_cpus
> + if (cpumask_first(sd_sysctl_cpus) >= nr_cpu_ids)
Use cpumask_empty() instead?
> + cpumask_copy(sd_sysctl_cpus, cpu_online_mask);
> + }
> +
> for_each_cpu(cpu, sd_sysctl_cpus) {
> struct sched_domain *sd;
> struct dentry *d_cpu;
> --
> 2.31.1
next prev parent reply other threads:[~2023-01-20 15:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 15:07 [RESEND PATCH] sched/debug: Put sched/domains files under the verbose flag Phil Auld
2023-01-19 15:36 ` Greg KH
2023-01-20 15:52 ` Valentin Schneider [this message]
2023-01-20 16:06 ` Phil Auld
2023-01-20 16:33 ` [PATCH v2] " Phil Auld
2023-01-21 7:43 ` Greg KH
2023-01-27 15:01 ` Valentin Schneider
2023-01-30 14:54 ` Srikar Dronamraju
2023-02-08 13:26 ` Phil Auld
2023-02-15 6:03 ` Vishal Chourasia
2023-03-03 18:37 ` [RESEND PATCH " Phil Auld
2023-03-09 14:44 ` Greg KH
2023-03-09 17:48 ` Phil Auld
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=xhsmh1qnpi4o8.mognet@vschneid.remote.csb \
--to=vschneid@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=ritesh.list@gmail.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=sshegde@linux.ibm.com \
--cc=vincent.guittot@linaro.org \
--cc=vishalc@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).