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] [day] [month] [year] [list]
Message-ID: <61eb1bb6-2ccf-4d89-be47-34bfe0ea9778@linux.microsoft.com>
Date: Mon, 10 Mar 2025 10:56:12 +0530
From: Naman Jain <namjain@...ux.microsoft.com>
To: K Prateek Nayak <kprateek.nayak@....com>,
 Valentin Schneider <vschneid@...hat.com>, Ingo Molnar <mingo@...hat.com>,
 Peter Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
 Vincent Guittot <vincent.guittot@...aro.org>,
 Dietmar Eggemann <dietmar.eggemann@....com>,
 Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
 Mel Gorman <mgorman@...e.de>
Cc: stable@...r.kernel.org, linux-kernel@...r.kernel.org,
 Steve Wahl <steve.wahl@....com>,
 Saurabh Singh Sengar <ssengar@...ux.microsoft.com>, srivatsa@...il.mit.edu,
 Michael Kelley <mhklinux@...look.com>,
 Shrikanth Hegde <sshegde@...ux.ibm.com>
Subject: Re: [PATCH v4] sched/topology: Enable topology_span_sane check only
 for debug builds



On 3/7/2025 9:11 PM, K Prateek Nayak wrote:
> Hello Naman,
> 
> On 3/7/2025 8:35 PM, Naman Jain wrote:
>>
>>
>> On 3/6/2025 10:18 PM, Valentin Schneider wrote:
>>> On 06/03/25 11:23, Naman Jain wrote:
>>>> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
>>>> index c49aea8c1025..666f0a18cc6c 100644
>>>> --- a/kernel/sched/topology.c
>>>> +++ b/kernel/sched/topology.c
>>>> @@ -2359,6 +2359,13 @@ static bool topology_span_sane(struct 
>>>> sched_domain_topology_level *tl,
>>>>   {
>>>>        int i = cpu + 1;
>>>>
>>>> +    /* Skip the topology sanity check for non-debug, as it is a 
>>>> time-consuming operation */
>>>> +    if (!sched_debug()) {
>>>> +        pr_info_once("%s: Skipping topology span sanity check. Use 
>>>> `sched_verbose` boot parameter to enable it.\n",
>>>> +                 __func__);
>>>
>>> FWIW I'm not against this change, however if you want to add messaging
>>> about sched_verbose I'd put that in e.g. sched_domain_debug() (as a 
>>> print
>>> once like you've done here) with something along the lines of:
>>>
>>>    "Scheduler topology debugging disabled, add 'sched_verbose' to the 
>>> cmdline to enable it"
>>
>>
>> Thank you so much for reviewing.
>> Please correct me if I misunderstood. Are you proposing below change?
>>
>> --- a/kernel/sched/topology.c
>> +++ b/kernel/sched/topology.c
>> @@ -2361,7 +2361,7 @@ static bool topology_span_sane(struct 
>> sched_domain_topology_level *tl,
>>
>>          /* Skip the topology sanity check for non-debug, as it is a 
>> time-consuming operation */
>>          if (!sched_debug()) {
>> -               pr_info_once("%s: Skipping topology span sanity check. 
>> Use `sched_verbose` boot parameter to enable it.\n",
>> +               pr_info_once("%s: Scheduler topology debugging 
>> disabled, add 'sched_verbose' to the cmdline to enable it\n",
>>                               __func__);
>>                  return true;
>>          }
>>
> 
> I think Valentin meant moving the same pr_info_once() to the early exit
> case in sched_domain_debug() for "!sched_debug_verbose" to notify the
> user that sched_debug() is disabled and they can turn it on using
> "sched_verbose" as opposed to announcing it from topology_span_sane().

Sure, thanks. Sent v5 with this change.

Regards,
Naman
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ