Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp582770lqp; Fri, 5 Apr 2024 02:48:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU5YDzZe6Ph+Bm1f/VkE8AUnCXdBjBdv6O6o6zdwj3ilt2BZvPY2MmiJGHb6485riD18OjsbE2/rLSWaERXO4pSkLyU2Y9yC/zKofBZCw== X-Google-Smtp-Source: AGHT+IEaba54YV4ogN3OzCn0o+6pAgskYTlynhBnjR5ENKgfOqGJCziTZG+i9dPDYHgiGu6uchhm X-Received: by 2002:a05:6358:d08c:b0:183:c6e2:8723 with SMTP id jc12-20020a056358d08c00b00183c6e28723mr1008082rwb.15.1712310508787; Fri, 05 Apr 2024 02:48:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712310508; cv=pass; d=google.com; s=arc-20160816; b=VGnQ4PEUH+LijRHKZkjk02AeJRtrBlq9L8aBWPhrs7/zrZrxji428AinXlFWViaJI+ R0clyUN2/p+FaXELQMG4ZnoBKq5XNRstKqXeTtuBIuBpbt1FtYc9ETHm0RFyxAxE2YeQ BVDTAPCjn6fSlvTzq80SPDZiataa2HYkQzdqThDDLneBuLIagh/aIA8gULjwahrVv5AS z8xZSkmNxrrHdeEq18CiS078O7o6H/orcg1mLxvss7tRLmw0seWkbVs5PVqlPtxhz9Pu K4D1syS9ARZNhRPUFczCDd7qHGySb6W7rWMrqNYp9XX5vkq5L8azjJYSB4WdyseraqFL 03Cg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=cmUMikdOHcHAaQC5V52wWU5IAOTy0tajedYtl0CFjHw=; fh=+ZZfrjeT9Ev0Qtd6IMVNxF3dZfsyQTqtlnxcDHB1mo4=; b=umrW0sF9YTVz9JJoK28nncCuV7CZKRSsiK6XMNe2FiYlRzOIY+wVIAIilNX2C/HyR0 D+m2NQX82FiofaxNVvs/2FWA2UqYAIPV0E75ol6MPGzzN9TnsZ+gx7wIDUbliduph5OC 5E2CI+FdovxaXmxjMhFdz2GLHzOC7zLPTGYbliVWdqx6BQn3dd5n/7KGj2SJtnEk/VPU bpqzN4Kxs+FcIYjjwSwf12FG6htZXOrEwdcWLif6pzyG61l/D0h75uvlzJ+NXMQiXVmq PUW8z7WlLpfD/BzKd5hEzVZiLAh/SD/lhfhLPsAVgGN96OM5RdqItUqazaS7q+QAAKle DEqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-132760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 12-20020a63134c000000b005f057f360c0si813059pgt.310.2024.04.05.02.48.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 02:48:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-132760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-132760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-132760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EA59FB213C8 for ; Fri, 5 Apr 2024 09:48:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADBD6160862; Fri, 5 Apr 2024 09:48:17 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 628641A26E for ; Fri, 5 Apr 2024 09:48:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310497; cv=none; b=QD9heXD5Nmh5EvAI4hcbF+pRG1gXNktzBXPvJ5EYmrUdpHmZ6HNzZEPc/osQ3MspzuRc/W0ebxq+/bH4uBFLkJqyzXNFb6yMEhV1Nta1+H/jwKM5/TXX+JRVC2sOHxElGUsWuV/yGinKjw7zrPuXUhLzEKw188FT7v4MWudsgCg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712310497; c=relaxed/simple; bh=cJbnnlU2IrQbKX6MyuGanbX91V+FSwBB56HgQEm7moE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f9HiIA1N4hhvdFYVSzqtSf298utKEQT6rGedo3MjCM2z4ycFCorKnzTSqxEf/Z6KC2KFBQ/KDdIDjXnCSwd0PbjH2JuInhQedFGjFxxTAUxR0cmh/6dApMeioac5PVmHNbeJSJO+tVx0u5v7UUTJTvaJQWw5gR4TK1mbA0WrbfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 422C1FEC; Fri, 5 Apr 2024 02:48:45 -0700 (PDT) Received: from [10.57.72.221] (unknown [10.57.72.221]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7C9753F64C; Fri, 5 Apr 2024 02:48:10 -0700 (PDT) Message-ID: Date: Fri, 5 Apr 2024 11:48:07 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/7] sched/fair: Remove on_null_domain() and redundant checks To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Aaron Lu , Rui Zhang , Anna-Maria Behnsen , Frederic Weisbecker , Ingo Molnar , Thomas Gleixner , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Waiman Long , Andrew Morton , Michal Hocko References: <20240403150543.2793354-1-pierre.gondois@arm.com> <20240403150543.2793354-7-pierre.gondois@arm.com> <20240404072745.GA35684@noisy.programming.kicks-ass.net> Content-Language: en-US From: Pierre Gondois In-Reply-To: <20240404072745.GA35684@noisy.programming.kicks-ass.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 >> --- >> 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