mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Gondois <pierre.gondois@arm.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, Aaron Lu <aaron.lu@intel.com>,
	Rui Zhang <rui.zhang@intel.com>,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	Frederic Weisbecker <frederic@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	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>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Waiman Long <longman@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@suse.com>
Subject: Re: [PATCH 6/7] sched/fair: Remove on_null_domain() and redundant checks
Date: Fri, 5 Apr 2024 11:48:07 +0200	[thread overview]
Message-ID: <a73e4a31-cd32-4e75-ad79-10492b2cd0e4@arm.com> (raw)
In-Reply-To: <20240404072745.GA35684@noisy.programming.kicks-ass.net>

Hello Peter,

On 4/4/24 09:27, Peter Zijlstra wrote:
> On Wed, Apr 03, 2024 at 05:05:38PM +0200, Pierre Gondois wrote:
>> CPUs with a NULL sched domain are removed from the HKR_TYPE_SCHED
>> isolation mask. The two following checks are equialent:
>> - !housekeeping_runtime_test_cpu(cpu, HKR_TYPE_SCHED)
>> - on_null_domain(rq)
>>
>> Remove on_null_domain() and the redundant checks.
>>
>> Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
>> ---
>>   kernel/sched/fair.c | 18 ++++++------------
>>   1 file changed, 6 insertions(+), 12 deletions(-)
>>
>> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
>> index 3e0f2a0f153f..9657c8f2176b 100644
>> --- a/kernel/sched/fair.c
>> +++ b/kernel/sched/fair.c
>> @@ -11830,11 +11830,6 @@ static void sched_balance_domains(struct rq *rq, enum cpu_idle_type idle)
>>   
>>   }
>>   
>> -static inline int on_null_domain(struct rq *rq)
>> -{
>> -	return unlikely(!rcu_dereference_sched(rq->sd));
>> -}
>> -
>>   #ifdef CONFIG_NO_HZ_COMMON
>>   /*
>>    * NOHZ idle load balancing (ILB) details:
>> @@ -12040,7 +12035,7 @@ void nohz_balance_exit_idle(struct rq *rq)
>>   	SCHED_WARN_ON(rq != this_rq());
>>   
>>   	/* If we're a completely isolated CPU, we don't play: */
>> -	if (on_null_domain(rq))
>> +	if (!housekeeping_runtime_test_cpu(cpu_of(rq), HKR_TYPE_SCHED))
>>   		return;
>>   
>>   	if (likely(!rq->nohz_tick_stopped))
> 
> This seems broken, the whole null domain can happen with cpusets, but
> this housekeeping nonsense is predicated on CPU_ISOLATION and none of
> that is mandatory for CPUSETS.

ok right,
I will try to remove this implicit dependency,

Regards,
Pierre

  reply	other threads:[~2024-04-05  9:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 15:05 [PATCH 0/7] sched/fair|isolation: Correctly clear nohz.[nr_cpus|idle_cpus_mask] for isolated CPUs Pierre Gondois
2024-04-03 15:05 ` [PATCH 1/7] sched/isolation: Introduce housekeeping_runtime isolation Pierre Gondois
2024-04-03 15:05 ` [PATCH 2/7] sched/isolation: Move HK_TYPE_SCHED to housekeeping runtime Pierre Gondois
2024-04-03 15:05 ` [PATCH 3/7] sched/isolation: Use HKR_TYPE_SCHED in find_new_ilb() Pierre Gondois
2024-04-03 15:05 ` [PATCH 4/7] sched/fair: Move/add on_null_domain()/housekeeping_cpu() checks Pierre Gondois
2024-04-03 15:05 ` [PATCH 5/7] sched/topology: Remove CPUs with NULL sd from HKR_TYPE_SCHED mask Pierre Gondois
2024-04-03 15:05 ` [PATCH 6/7] sched/fair: Remove on_null_domain() and redundant checks Pierre Gondois
2024-04-04  7:27   ` Peter Zijlstra
2024-04-05  9:48     ` Pierre Gondois [this message]
2024-04-03 15:05 ` [PATCH 7/7] sched/fair: Clear idle_cpus_mask for CPUs with NULL sd Pierre Gondois
2024-04-04  3:01 ` [PATCH 0/7] sched/fair|isolation: Correctly clear nohz.[nr_cpus|idle_cpus_mask] for isolated CPUs Waiman Long
2024-04-04 12:55   ` Pierre Gondois
2024-04-05  0:23     ` Waiman Long
2024-04-09 13:33       ` Pierre Gondois

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=a73e4a31-cd32-4e75-ad79-10492b2cd0e4@arm.com \
    --to=pierre.gondois@arm.com \
    --cc=aaron.lu@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anna-maria@linutronix.de \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rui.zhang@intel.com \
    --cc=tglx@linutronix.de \
    --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

all inboxes | Powered by JetHome®