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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Jul 2018 09:56:47 -0400
From:   Waiman Long <longman@...hat.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Ingo Molnar <mingo@...hat.com>, cgroups@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
        kernel-team@...com, pjt@...gle.com, luto@...capital.net,
        Mike Galbraith <efault@....de>, torvalds@...ux-foundation.org,
        Roman Gushchin <guro@...com>,
        Juri Lelli <juri.lelli@...hat.com>,
        Patrick Bellasi <patrick.bellasi@....com>
Subject: Re: [PATCH v11 9/9] cpuset: Allow reporting of sched domain
 generation info

On 07/19/2018 09:54 AM, Peter Zijlstra wrote:
> On Sun, Jun 24, 2018 at 03:30:40PM +0800, Waiman Long wrote:
>> This patch enables us to report sched domain generation information.
>>
>> If DYNAMIC_DEBUG is enabled, issuing the following command
>>
>>   echo "file cpuset.c +p" > /sys/kernel/debug/dynamic_debug/control
>>
>> and setting loglevel to 8 will allow the kernel to show what scheduling
>> domain changes are being made.
>>
>> Signed-off-by: Waiman Long <longman@...hat.com>
>> ---
>>  kernel/cgroup/cpuset.c | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 07a5575..62b7e61 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -836,6 +836,23 @@ static int generate_sched_domains(cpumask_var_t **domains,
>>  	return ndoms;
>>  }
>>  
>> +#ifdef CONFIG_DEBUG_KERNEL
>> +static inline void debug_print_domains(cpumask_var_t *doms, int ndoms)
>> +{
>> +	int i;
>> +	char buf[200];
>> +	char *ptr, *end = buf + sizeof(buf) - 1;
>> +
>> +	for (i = 0, ptr = buf, *end = '\0'; i < ndoms; i++)
>> +		ptr += snprintf(ptr, end - ptr, "dom%d=%*pbl ", i,
>> +				cpumask_pr_args(doms[i]));
>> +
>> +	pr_debug("Generated %d domains: %s\n", ndoms, buf);
>> +}
>> +#else
>> +static inline void debug_print_domains(cpumask_var_t *doms, int ndoms) { }
>> +#endif
> I still hate this patch.. it prints information already available in
> sched_debug and has that rediculous on-stack buffer.

This patch is just for my own testing purpose. We can certainly drop that.

Tejun, please drop this one.

Thanks,
Longman

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ