public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Naman Jain <namjain@linux.microsoft.com>
To: Valentin Schneider <vschneid@redhat.com>,
	Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steve Wahl <steve.wahl@hpe.com>,
	Saurabh Singh Sengar <ssengar@linux.microsoft.com>,
	srivatsa@csail.mit.edu, K Prateek Nayak <kprateek.nayak@amd.com>,
	Michael Kelley <mhklinux@outlook.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>
Subject: Re: [PATCH v4] sched/topology: Enable topology_span_sane check only for debug builds
Date: Fri, 7 Mar 2025 20:35:23 +0530	[thread overview]
Message-ID: <81b11433-58ac-4a2c-a497-d6d91e330810@linux.microsoft.com> (raw)
In-Reply-To: <xhsmhwmd2ds0o.mognet@vschneid-thinkpadt14sgen2i.remote.csb>



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;
         }


Regards,
Naman

> 
>> +		return true;
>> +	}
>> +
>>        /* NUMA levels are allowed to overlap */
>>        if (tl->flags & SDTL_OVERLAP)
>>                return true;
>> --
>> 2.34.1


  reply	other threads:[~2025-03-07 15:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06  5:53 [PATCH v4] sched/topology: Enable topology_span_sane check only for debug builds Naman Jain
2025-03-06 16:48 ` Valentin Schneider
2025-03-07 15:05   ` Naman Jain [this message]
2025-03-07 15:41     ` K Prateek Nayak
2025-03-10  5:26       ` Naman Jain

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=81b11433-58ac-4a2c-a497-d6d91e330810@linux.microsoft.com \
    --to=namjain@linux.microsoft.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mhklinux@outlook.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=srivatsa@csail.mit.edu \
    --cc=ssengar@linux.microsoft.com \
    --cc=sshegde@linux.ibm.com \
    --cc=stable@vger.kernel.org \
    --cc=steve.wahl@hpe.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.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