lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 20 Jan 2023 11:06:35 -0500
From:   Phil Auld <pauld@...hat.com>
To:     Valentin Schneider <vschneid@...hat.com>
Cc:     linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
        mingo@...hat.com, vishalc@...ux.vnet.ibm.com, peterz@...radead.org,
        srikar@...ux.vnet.ibm.com, sshegde@...ux.ibm.com,
        vincent.guittot@...aro.org, ritesh.list@...il.com
Subject: Re: [RESEND PATCH] sched/debug: Put sched/domains files under the
 verbose flag

On Fri, Jan 20, 2023 at 03:52:55PM +0000 Valentin Schneider wrote:
> 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@...erman.id.au>.
> >
> > Signed-off-by: Phil Auld <pauld@...hat.com>
> > Cc: Michael Ellerman <mpe@...erman.id.au>
> > Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Peter Zijlstra (Intel) <peterz@...radead.org>
> > Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
> > Cc: Valentin Schneider <vschneid@...hat.com>
> > Cc: Vishal Chourasia <vishalc@...ux.vnet.ibm.com>
> > Cc: Vincent Guittot <vincent.guittot@...aro.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@...hat.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?

Heh, I didn't find that when I looked somehow :)  Yes, that's what this check
is doing. I'll fix these in a quick v2.


Thanks!


Cheers,
Phil



> 
> > +			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
> 

-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ