[tip:,sched/core] sched/fair: Take the scheduling domain into account in select_idle_core()
Message ID | 170915761064.398.16226994228942102834.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:a1a:b0:17b:cd04:e0c6 with SMTP id 26csp226476rwa; Wed, 28 Feb 2024 14:17:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUTUqPmxgOFZL4lj6DGvSS5yJ2jK2wfx/JHKIM2EvJuEe+1xDaXTfo5sKQb/NSOqUD4k4Ods8svBk7Y4MUCFDbaqkIQow== X-Google-Smtp-Source: AGHT+IHfS4gBQOhS9EXwf19tGsNZ4G9HzuSYp8xPF73lK2ZU5qXiHtxG6nzODSW/h6J5pwfSFibp X-Received: by 2002:a17:903:44c:b0:1dc:cee2:5ffc with SMTP id iw12-20020a170903044c00b001dccee25ffcmr261779plb.6.1709158636834; Wed, 28 Feb 2024 14:17:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709158636; cv=pass; d=google.com; s=arc-20160816; b=U3UWX3xA560377Wmo6wqH80HTmaezfvALv7l0E/VXeeV+VsCQRu2kpA/Klzjp36BHM QAEXnWEeMY1y88clhEwqpBOC9S1UBS04OKjjhJ2NikwnEpLy2/i4zYYfx04FzN8DzGiZ PJfFYC46Ifc6i9cS7hGTSMqcKmJWCgCsJtvq1QilJ68mRi+KOj6etIxF91OYBwdj1zAz YpqL0h7be3TfUPSoe7APRMNLUyfSV6Dl44jz1sbelUmhAjMKpkR6OskTeV/MZPzcLNJ1 TRLCrUkvN+wkBMnzgQE/4XXoXIxj1tIJSOsCf8mckF07gBRC1JCC6cMNTkm90XwUeyth HRNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=EnS6UuJmBMH7/430zXS4EIQRF1tEAu6qefk+hRUXSUs=; fh=3pEFVmGQ79Fzr/DKbr1q0ujyrzUWRpnoSqeH5PxEzgA=; b=H5VxAWvwkp47UzcwakbdEWrlP9opBh/ePxWF1HOH2uZo67V+KxlD8eSGQU7yvfbYK5 ZRcRiNV5ICGeYzk91B/BbzaWHVfsHRXCANyTcdH8KsC3mFjwCFyfmeTPdw3IdACnA8+p PXQp1HckOptWykrkjEt9MpTfgvYRewukUyMsCmjhSI4FjLEdM5JQWykMXAiakyaQC8Mo jeACPd+gSEperiW3hGOV54dUk6DTc/L7/tqP2vkqFH9dmwE8zz5QTFbGiJelB/IwB4J0 2FXyazpXbNU9O6Bfp6OINmw0VzuyCJB3D3q+O50RAvVb4BjDMrxnXJ+3nei4000Jn9pf ZWcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cwo4QFEn; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id iz12-20020a170902ef8c00b001dc32737f5asi3860216plb.425.2024.02.28.14.17.16 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 14:17:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=cwo4QFEn; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85756-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 4440FB26C8B for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 22:02:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E23AC15F321; Wed, 28 Feb 2024 22:00:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="cwo4QFEn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2vKFEeQr" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F416C7291E; Wed, 28 Feb 2024 22:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157618; cv=none; b=iERL9uebCGmtlQVMilSjLrjwlHGwtUHwgptL++i1yCcZ1jX9oO34rzWOhFLdpqIuBSGWbXNisgDH5IZGF4PJraLRqheqt3RLCJnuC2bRiiZPbM+2euTr2xsQmSSyspH7Y7dNkRG64iM0wEtpWSruwLaR6W7ZC9rU3T35WiAGXII= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709157618; c=relaxed/simple; bh=ODJIhAp5TVgGPr0dRW90JNCR+6Uyvwlt5OWajFgQlWQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=qbwqWn8V2JlW2/WHAsXhFhKoJza/Cli5yjtQAGXmT996AfbLdnmhtOebwNRtqOoYTZ+g5ClQKCXj2P7lvRo7f0LuwB7o2Eh2LKWqhZTtF/lmcMJWTtEGtgzwhEfmwFbY12jnMCeKHxCQvnbgvnmihYEToiKQQQdMmNHOdqBwfvE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=cwo4QFEn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2vKFEeQr; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Wed, 28 Feb 2024 22:00:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709157611; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EnS6UuJmBMH7/430zXS4EIQRF1tEAu6qefk+hRUXSUs=; b=cwo4QFEnNBpELvU7EUw+sU0YXJCjv3vnVDWBS7Yu5AvyKRL27cOkmKZpGMxMtpVcq9b2P+ KLuVauTsebRGSMztcFgCjdMEcpriXPyKiD4zdYCOWIWWzYi2n4OnQxGhqZdUgTbYXJoi6k povhzBKEB1iRM/1jBExHAfK4txSFgxkaKxdpg8Owzjloc5f0nCF/Pd7P6mBU6OWgWWQMpq ACZ402AvcfguGk6xxUnafLH2w6UBTXolGjM5adEv/pKGfSaiUvULLvRKHxxMj0cldGtYJJ Cy1+yrnPALJ3ctrQ3sUzjxknRmuLqzSlpI4ckl5UvJuRF9HFGGuxh9kzcbytjA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709157611; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EnS6UuJmBMH7/430zXS4EIQRF1tEAu6qefk+hRUXSUs=; b=2vKFEeQrnvfxn17WngBV/T9ZCSd3kiegv6ClmNX5hjYdEJL9xj4mx8p1j/F/iX/d54DI4n CYvtdxQYBlx6QtCQ== From: "tip-bot2 for Keisuke Nishimura" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Take the scheduling domain into account in select_idle_core() Cc: Keisuke Nishimura <keisuke.nishimura@inria.fr>, Julia Lawall <julia.lawall@inria.fr>, Ingo Molnar <mingo@kernel.org>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240110131707.437301-2-keisuke.nishimura@inria.fr> References: <20240110131707.437301-2-keisuke.nishimura@inria.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Message-ID: <170915761064.398.16226994228942102834.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792182726989170475 X-GMAIL-MSGID: 1792182726989170475 |
Series |
[tip:,sched/core] sched/fair: Take the scheduling domain into account in select_idle_core()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Feb. 28, 2024, 10 p.m. UTC
The following commit has been merged into the sched/core branch of tip: Commit-ID: 23d04d8c6b8ec339057264659b7834027f3e6a63 Gitweb: https://git.kernel.org/tip/23d04d8c6b8ec339057264659b7834027f3e6a63 Author: Keisuke Nishimura <keisuke.nishimura@inria.fr> AuthorDate: Wed, 10 Jan 2024 14:17:07 +01:00 Committer: Ingo Molnar <mingo@kernel.org> CommitterDate: Wed, 28 Feb 2024 15:15:49 +01:00 sched/fair: Take the scheduling domain into account in select_idle_core() When picking a CPU on task wakeup, select_idle_core() has to take into account the scheduling domain where the function looks for the CPU. This is because the "isolcpus" kernel command line option can remove CPUs from the domain to isolate them from other SMT siblings. This change replaces the set of CPUs allowed to run the task from p->cpus_ptr by the intersection of p->cpus_ptr and sched_domain_span(sd) which is stored in the 'cpus' argument provided by select_idle_cpu(). Fixes: 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()") Signed-off-by: Keisuke Nishimura <keisuke.nishimura@inria.fr> Signed-off-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20240110131707.437301-2-keisuke.nishimura@inria.fr --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 005f6d3..352222d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7289,7 +7289,7 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu if (!available_idle_cpu(cpu)) { idle = false; if (*idle_cpu == -1) { - if (sched_idle_cpu(cpu) && cpumask_test_cpu(cpu, p->cpus_ptr)) { + if (sched_idle_cpu(cpu) && cpumask_test_cpu(cpu, cpus)) { *idle_cpu = cpu; break; } @@ -7297,7 +7297,7 @@ static int select_idle_core(struct task_struct *p, int core, struct cpumask *cpu } break; } - if (*idle_cpu == -1 && cpumask_test_cpu(cpu, p->cpus_ptr)) + if (*idle_cpu == -1 && cpumask_test_cpu(cpu, cpus)) *idle_cpu = cpu; }