From nobody Sat Feb 7 08:45:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B27CAEB64D9 for ; Mon, 10 Jul 2023 08:14:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232761AbjGJIOM (ORCPT ); Mon, 10 Jul 2023 04:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232937AbjGJINq (ORCPT ); Mon, 10 Jul 2023 04:13:46 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C038E1; Mon, 10 Jul 2023 01:13:45 -0700 (PDT) Date: Mon, 10 Jul 2023 08:13:43 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1688976823; 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=mjzAB0fzsGtpLPet2sHs0gH5HogT3zoQ1G1ZId/Omvc=; b=QqvMu0qV9yQz/8lmSuyoMvW8CniVz7MqDKJHugsPJRcgH5qJlJXLhUIMyr635+1ttf5H3v BehgWj+fNFsXqg/R6SPaQE7bwapE+afek/MADOTgTx1JUon8ZUYnhStWH7tP+VlCbDo5T6 rslFN5+eRUr38a1Ha7LaMX2s0ZUy8lpR+sJOIeNlxt+Tyh5Gx3h8eoVUCrEg2B4p49KcPY 35GaHuNAUrTgY+OO5Q11/qNxTYgajh5Y0QslD4wKeHV0JBaTi88jFuGz44Vjhj2kod6Zj9 ZTeweHKo3qvtJIVyFKz94hS6HG+XHJxivP7LWlojWxDO6TxgT9UWeYFaqZG9Fw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1688976823; 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=mjzAB0fzsGtpLPet2sHs0gH5HogT3zoQ1G1ZId/Omvc=; b=YPYe8GiwtjZIR+272qfTugkeqbh4LCZA6RFtM6NLfaWx2/c+TLyd86psc58Ych25tSVyMf iguhKx0d7waJHsAQ== From: "tip-bot2 for Miaohe Lin" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/fair: Use recent_used_cpu to test p->cpus_ptr Cc: Miaohe Lin , "Peter Zijlstra (Intel)" , Phil Auld , Mel Gorman , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230620080747.359122-1-linmiaohe@huawei.com> References: <20230620080747.359122-1-linmiaohe@huawei.com> MIME-Version: 1.0 Message-ID: <168897682340.404.2001714944772345675.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/urgent branch of tip: Commit-ID: ae2ad293d6be143ad223f5f947cca07bcbe42595 Gitweb: https://git.kernel.org/tip/ae2ad293d6be143ad223f5f947cca07bc= be42595 Author: Miaohe Lin AuthorDate: Tue, 20 Jun 2023 16:07:47 +08:00 Committer: Peter Zijlstra CommitterDate: Mon, 10 Jul 2023 09:52:30 +02:00 sched/fair: Use recent_used_cpu to test p->cpus_ptr When checking whether a recently used CPU can be a potential idle candidate, recent_used_cpu should be used to test p->cpus_ptr as p->recent_used_cpu is not equal to recent_used_cpu and candidate decision is made based on recent_used_cpu here. Fixes: 89aafd67f28c ("sched/fair: Use prev instead of new target as recent_= used_cpu") Signed-off-by: Miaohe Lin Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Phil Auld Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20230620080747.359122-1-linmiaohe@huawei.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a80a739..b3e25be 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7174,7 +7174,7 @@ static int select_idle_sibling(struct task_struct *p,= int prev, int target) recent_used_cpu !=3D target && cpus_share_cache(recent_used_cpu, target) && (available_idle_cpu(recent_used_cpu) || sched_idle_cpu(recent_used_cp= u)) && - cpumask_test_cpu(p->recent_used_cpu, p->cpus_ptr) && + cpumask_test_cpu(recent_used_cpu, p->cpus_ptr) && asym_fits_cpu(task_util, util_min, util_max, recent_used_cpu)) { return recent_used_cpu; }