Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp479783lqc; Fri, 8 Mar 2024 03:21:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXTMbq5CIydpp+lrUHTZ/Dq7HidELvYZ7JQaPcp5Lx+57P+F0sHm2WcQWtwPm2CjHeJsbWQRcnjEcZONqKXJvq0Js2KVKParQz9b26oSw== X-Google-Smtp-Source: AGHT+IFCpoPY1hkBSUaJkbRcy3CiDiUIhDrs7dbukw75lFICXJW7oVxvXPNDf5ryI8iOA2+8xTUi X-Received: by 2002:a05:6122:459d:b0:4c7:6d00:767a with SMTP id de29-20020a056122459d00b004c76d00767amr10123951vkb.14.1709896874898; Fri, 08 Mar 2024 03:21:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709896874; cv=pass; d=google.com; s=arc-20160816; b=DuuBGJejIa45ddxm+VMID/Yxpgskh0lYc94UqmslCrk4K+CkpeXWQ5Ae/KWYLy55Sb zkbRMhzKy4+eHLBXFWlrrHX/TSkSlZduMAycIsCsDBYyVfY049KB0CLxJsgeYP0aVy4b ObH1EGqNXcxi086+NWNcKridZyjWXsUWUfn6Jsm1SvRJabRap6s9evWCt9sUoXQNRXcx 2l2ezAt/bTFrrmRSUnKmL8yozM7mrMF2aQcSi/lDVVKGvzLTauciYh4wSa809TBRvsh/ YKGESUsi/zpV4tFkag7N/n3egLbjuogQa1DPp2vs8tD5ZXOIQ7ZrovspkG/28enNAKVv 8Iww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:sender:dkim-signature; bh=+9br3RKNBjSYu+KVu9Dy6exTj0eK3ABqPcmihkUiY/s=; fh=OcJXSzmkLDbgQwS3rZxaE49G8zF2FryOX8LPvjExb+Y=; b=DjUCwy+1t2/B5zTCNWU+RUbaeJz7LdW8sekhjdwQeB3VyI0UVayDUaThskuUH1Ug83 Aa6Kq6u6qKWHjlLQGbV58FByWGA1/lQEd4WZf0tzLE3lfxsa+WOATFZFb9jc78N5V7Yw 9jO7BHH7xkycjg6PlRh9Lklb7qzKBCca+YrO90vbJGBa/cE8owy2YPHJqMLnDhlcyw8H bqe+lb4b6+bnyiFZB2G4f+ts0xHeYdVinTUnuhd4/BhrNvoH9vTth1Jw3LZmPo/aVRLb vw+OTeBdAZIhbk2i/7r7p+CpwyNpf+aZSYgswh6hT/w75VjHlSLKNk204iWkq+p2TGVQ h09g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Q3Re3A8A; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 3-20020ac85943000000b0042e7cdd139esi11745317qtz.585.2024.03.08.03.21.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:21:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Q3Re3A8A; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96919-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96919-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A014D1C21455 for ; Fri, 8 Mar 2024 11:21:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1550B5E074; Fri, 8 Mar 2024 11:18:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Q3Re3A8A" Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73CE45CDC9 for ; Fri, 8 Mar 2024 11:18:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709896727; cv=none; b=fZnMBwucGD+phhab3zPL3WmDJ1gj+Ip78FEahNS0DCcYvjzgwKwsVdj8k7TtpxaeO26zDVQEGmAdNp1hoP5p86uWFCa3bW/E+yKHkOUzLOYLL2FUumzvxHsJWJKqu7NZDT1wGur73xQHk8enc2e0sSROwzEzZkdUF9zMVAp4OhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709896727; c=relaxed/simple; bh=nFc6H2LARbAQKvySIdNn59YzkG9s6blD8CUVxFU9/GY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cSRz1TNzGHjZOftuDFn0S2Je+6uWhU5KfwTtRRSU5iE1u2sC5aLTAxbvIIQrelMRUMjR8OiDAU6TPwNdTxyhJb2tds+Nag0ZqK9swTJvCTcv1mDU7e5cgh5IglnOS48SXkzx0oJfyBMjIbSgSXRLLxkoKIPda/Sxa6gIgai75Rc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Q3Re3A8A; arc=none smtp.client-ip=209.85.221.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f50.google.com with SMTP id ffacd0b85a97d-33e285a33bdso1105740f8f.2 for ; Fri, 08 Mar 2024 03:18:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709896724; x=1710501524; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=+9br3RKNBjSYu+KVu9Dy6exTj0eK3ABqPcmihkUiY/s=; b=Q3Re3A8AU6orRCQOTAIyIM7jDklw3lrI58pZ5PR4NcuTF/RUOEm5YkKtXejlM8r+/P d6LBJqSU07W37Cz/2cSkm206Ogz558kLbZp8A/EOORgMmlzAh/jZqCGqUVl25VT7zOop r42uaZriUyxY0tqg/LuN3awHqLYrH8J/g7rVv5OJYaSTo7Sv4oIdDCFLnclkpsZQWQfG AELkVmediC+wQoND1x2t5+IY7Zu1BRsNlE64VVchEqg9QQpn/c87k3pvYy0LKvXJjwRn 8f27TWp2xXvELH19SHNnUk+g0AQEHcxZ8lxrzboJk/4w935vwEmVsBsFhx4bX2iH+1dA /HuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709896724; x=1710501524; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+9br3RKNBjSYu+KVu9Dy6exTj0eK3ABqPcmihkUiY/s=; b=BES0llpPFC4y22oBixU0AXjZiVWG/TfSORkD8+8iS59qxeW0RHdoP9uxfWDs6m9r4x x/GyC4KxH6p5nJwEk9anOi1Oj0u+ZXSgMhPYBgbXGmx85tocaX+64l1wFTHzmMLPMLGl uZvAEXWNv9vdr2YEhpDAbmPGFE2y6ENH5PUSXQFhROgEsuFvD6ehiIaKZkramYEuEHsq 3uXwKDEnysZniWZHxb7SM00kyjmstLvlD9VPAvvv4RoX4LFQZyE5rGyfhTQ6eTfgNs2q hamybpCHktGCKiFnQTmf+p/3K9+HNPPi8LlDm4lSg/wIcf2TSbi7rl/BAPzpyZ7kR1sf R8zg== X-Gm-Message-State: AOJu0Yx9eAxuf2bF58762xN9ceoF4bBOX58/pwvedo89KQKRKb1BFtkY DHGZpXICViJ+zCCvzPzla3pIFQcs1oY9HYZtN8tA/pqJW/J9FBw2k+vDj9pbaVs= X-Received: by 2002:adf:9c92:0:b0:33e:1df1:b76d with SMTP id d18-20020adf9c92000000b0033e1df1b76dmr14697595wre.44.1709896723539; Fri, 08 Mar 2024 03:18:43 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id v9-20020adfedc9000000b0033e712b1d9bsm2523884wro.77.2024.03.08.03.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:18:43 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Dietmar Eggemann , Linus Torvalds , Peter Zijlstra , Shrikanth Hegde , Valentin Schneider , Vincent Guittot Subject: [PATCH 11/13] sched/balancing: Rename find_idlest_group_cpu() => sched_balance_find_dst_group_cpu() Date: Fri, 8 Mar 2024 12:18:17 +0100 Message-Id: <20240308111819.1101550-12-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308111819.1101550-1-mingo@kernel.org> References: <20240308111819.1101550-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Standardize scheduler load-balancing function names on the sched_balance_() prefix. Also use 'dst' instead of 'idlest': while historically correct, today it's not really true anymore that we return the 'idlest' group or CPU, we sort by idle-exit latency and only return the idlest CPUs from the lowest-latency set of CPUs. The true 'idlest' CPUs often remain idle for a long time and are never returned as long as the system is under-loaded. Signed-off-by: Ingo Molnar Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Shrikanth Hegde Cc: Valentin Schneider Cc: Vincent Guittot --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index aa5ff0efcca8..02ff0272b2e4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7101,10 +7101,10 @@ static struct sched_group * find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu); /* - * find_idlest_group_cpu - find the idlest CPU among the CPUs in the group. + * sched_balance_find_dst_group_cpu - find the idlest CPU among the CPUs in the group. */ static int -find_idlest_group_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) +sched_balance_find_dst_group_cpu(struct sched_group *group, struct task_struct *p, int this_cpu) { unsigned long load, min_load = ULONG_MAX; unsigned int min_exit_latency = UINT_MAX; @@ -7191,7 +7191,7 @@ static inline int find_idlest_cpu(struct sched_domain *sd, struct task_struct *p continue; } - new_cpu = find_idlest_group_cpu(group, p, cpu); + new_cpu = sched_balance_find_dst_group_cpu(group, p, cpu); if (new_cpu == cpu) { /* Now try balancing at a lower domain level of 'cpu': */ sd = sd->child; -- 2.40.1