Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp404550pxt; Thu, 5 Aug 2021 02:36:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLZBSHO2s7ee8GcScVjrKvki6vI0aJ+i66bswt4uqlyd6+l23HRsoyak7tCeFEoN2I5ACM X-Received: by 2002:aa7:c68e:: with SMTP id n14mr5379216edq.66.1628156181795; Thu, 05 Aug 2021 02:36:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628156181; cv=none; d=google.com; s=arc-20160816; b=QEWIGRIIMEoPtnVnZ68SRZmp6LRXTZkSKrcHHIU3b9dWMIizQfKYQG+DbPcnnL5SsZ e2KpMLTIm6K1GYM8ZMp4E4GgTXBs/kL2KmlqOBEWlIXvhdQC1lHX5Hbn14XHaLtNOsg4 of1qjcWyt/5Os5lw8P5Xj3iNjlIIT8ObMwZgsew6NA2KdIUZeNdu6ijJ6a8GxG3WWcB5 8SpiXYzuxW5+plDu8t3S7YdIsiBLqtQXDAcDCWPNxDImqlfTfunbWqciu0tz33tLOdFO 3+24JO1IWSxHgo/8QwNRSp8ZJ1Tu6lkWJBRm6HVbrZuRmGigCpherOHir8wa6wJsQ7pM G8zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=RjvlCLNLQMEOHBa4pu2I3ZAxvthgoW66trV7b8hD6Uk=; b=0y8BUQvNbsml/KmQwmQmB6c1/Xa1I+bJ+f7kOagZP8elkNJMVPz8aqjM/HFSo/sjWd fD7eGcubf+0t6KrDKBlJ1csIa/7+ZL06GYb97NRpqEPAa+VvjSzfduN79lk0gxltlWx5 Cf+LE6hUJqkoWgDSPIPuHhcxISY/+t3AFSGBXN8Z1Sq8uC/rCCuJnUMOI/l2wEj/6qlV XXjt74HihJAPjpOEAkhzJNxjURBaXmwYNa0R+8TOSwN/iS1w3a5/jF/3WEuOnqZd6Oq7 QC0uchbfwqbGHGzyFVDS7o8JX2cYV2JibrKR1TGDP135mmJRcrHtvnZBKuTF5cb6m4nS yJxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="C/hCXucQ"; dkim=neutral (no key) header.i=@linutronix.de header.b=G0HGVM3+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p7si5266053edw.488.2021.08.05.02.35.58; Thu, 05 Aug 2021 02:36:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="C/hCXucQ"; dkim=neutral (no key) header.i=@linutronix.de header.b=G0HGVM3+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239214AbhHEJew (ORCPT + 99 others); Thu, 5 Aug 2021 05:34:52 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41640 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238958AbhHEJet (ORCPT ); Thu, 5 Aug 2021 05:34:49 -0400 Date: Thu, 05 Aug 2021 09:34:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1628156074; 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=RjvlCLNLQMEOHBa4pu2I3ZAxvthgoW66trV7b8hD6Uk=; b=C/hCXucQV80Bmp4D96mP2A8ZOMXUl8t357O+acl9ORP3z2ZFH+XSAU7vb+cPRCvhBsuhub EK+yTCDiFzY+Fb+ACQYFUKCoaIzpja6P2MJcGDkfvtc+KG24hx+195DncAo2sbRrkl6wNv Xen2rRKvfoFpMKRH7/OvsbFjHQfHnZdpG+97F7B0MUAR5gdzMSprnuUHIwJBVz4ocg695V MTyWQbwzlrt3D+t2lea2WvLLun40VPxwdSzoV7GT46ByWkgFcptEcraCw517cgebY5yhal hjSsM/AEtTgo1Su7HW/pO+IgvIVeQzEXP/Czc7yl+TqsyjzRS6YWQMltf2f55g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1628156074; 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=RjvlCLNLQMEOHBa4pu2I3ZAxvthgoW66trV7b8hD6Uk=; b=G0HGVM3+AGl3gYdquN6e1mkG20kOGJ5w4lskYpVTHkaV5lBrEuJDBWkjkcAYvgF6yhghOq UmRFL7le44kfnCDg== From: "tip-bot2 for Mel Gorman" 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: Avoid a second scan of target in select_idle_cpu Cc: Mel Gorman , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210804115857.6253-3-mgorman@techsingularity.net> References: <20210804115857.6253-3-mgorman@techsingularity.net> MIME-Version: 1.0 Message-ID: <162815607370.395.4560583728552595431.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: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 56498cfb045d7147cdcba33795d19429afcd1d00 Gitweb: https://git.kernel.org/tip/56498cfb045d7147cdcba33795d19429afcd1d00 Author: Mel Gorman AuthorDate: Wed, 04 Aug 2021 12:58:57 +01:00 Committer: Peter Zijlstra CommitterDate: Wed, 04 Aug 2021 15:16:44 +02:00 sched/fair: Avoid a second scan of target in select_idle_cpu When select_idle_cpu starts scanning for an idle CPU, it starts with a target CPU that has already been checked by select_idle_sibling. This patch starts with the next CPU instead. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210804115857.6253-3-mgorman@techsingularity.net --- 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 7ee394b..47a0fbf 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -6220,7 +6220,7 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool time = cpu_clock(this); } - for_each_cpu_wrap(cpu, cpus, target) { + for_each_cpu_wrap(cpu, cpus, target + 1) { if (has_idle_core) { i = select_idle_core(p, cpu, cpus, &idle_cpu); if ((unsigned int)i < nr_cpumask_bits)