Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp479655lqc; Fri, 8 Mar 2024 03:21:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWkdimXEjhWXpEGsOfYDLmS2edPjiPO4d3fZnpC95iUsSfZD19IN4lOgIuWhc3TycdUism28PT086cUCqqBleXpFlmDWywAazPjD+yK9g== X-Google-Smtp-Source: AGHT+IHRIdEnMdhZAyQmyyq6Jg6+QxfNvZQG4FyCTSP7B/OgL0Z84d/QemIzRCsUBqNDFAJdxK4A X-Received: by 2002:a05:6102:3a13:b0:472:e6e0:882a with SMTP id b19-20020a0561023a1300b00472e6e0882amr11453882vsu.7.1709896859869; Fri, 08 Mar 2024 03:20:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709896859; cv=pass; d=google.com; s=arc-20160816; b=K+k5z3ZUqlURB4WAVxaHx/HwSFuvYFaCg0avqIM1fazECL6xdkPsjkOSmeqWgQDXAQ ok/16myQfpKAZszSidz4HAz6DthWvK0XKQtSOPNSztuk12/85bw+E2J88AWwmZgvZaTo qZfKuDwMSsme22M7veYBQXrNBRjFgnj2tsUJZvyRWSquo8WWyc0pha5VQvun0M4a2IOQ s4g/Azt1Gsh1KKrXsOn0HqXns+lynWDXzOC8+47T5BzCq0CX8cO17lTB6MFRJMAEUEQy ubCblTQoaoc0UTh9+KwGDemr0KPNzbOiBcQYyaIwPNIXSEdFO0czd92rJl5j6fNXkupG TOfg== 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=uwlzocWJiHgoQscu/IevEQ9ciKsE6ki7xCF7izVWXbo=; fh=OcJXSzmkLDbgQwS3rZxaE49G8zF2FryOX8LPvjExb+Y=; b=TBtTDb2s5z2Sd0OQqTDnjyvGxcPB+a7GK3DZWJ8DDiW6ilvsA1OHc+bUkDmsDB8YeK zwkIljpAgcSO58QbxARoIRxXGEMEWqxWiwFxXmuvQd5131+HupGHQK9vXxYDoySjZWui hbaMH93UQq3NKLYVnAzEAPOqD2Bw9ZnB4RGNFxN6n66Cr65cF0feuXKxgUmW060gTdL3 KUSn+DxpORgu69MbK/wygde2stUFgQqmLh+J/CNPgFJv4gb4kITGHD3CciZ6K2QqKiuP 7rMUqTbH8mdaxOWTPHlz4isP8KLYy4o0YERxg/Obu0mKesz9CRrYMHf89kSkYSS9ok7u qeNQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KVZP88vr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96918-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96918-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 ey14-20020a0562140b6e00b0068f08c94871si19318095qvb.513.2024.03.08.03.20.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:20:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96918-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=KVZP88vr; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-96918-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96918-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 86E5F1C211FE for ; Fri, 8 Mar 2024 11:20:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 253B35DF02; Fri, 8 Mar 2024 11:18:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KVZP88vr" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 694A95B5C1 for ; Fri, 8 Mar 2024 11:18:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709896726; cv=none; b=g4K022Tj5smcMNWe+LEITupuBXTS743/ecuBmXhQ6mfdwTanQcJOL/FY0JjomaulDEJwota/GKeYLduBMjxsVTn2C/2+erygRJgJAVcgIpnJZl/k8JWuidkKYvOoXvaT43zu5JG6jvhPVi/nFNv+wvEbUmN0D1AWqE/4kF6jV24= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709896726; c=relaxed/simple; bh=NedhpULzZYZ8ME39VE5CA7FZTCBqwKEANbkZH0WTMm8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FFRSHuVHiBRjOfeDZqU7Jq12KIbOBmbfPgZMSFRvLizbucC0UEq9wD2AVMrLDnhljVIL+Q5Vt+unAavLxiQmi009CUDY9Qpm/FE6y5ifrgmaqEXgYi7riisG53x9eVf6UzmpSJD/BqRuT2ir1GTFh42I98LwAH5mMECylHteQ08= 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=KVZP88vr; arc=none smtp.client-ip=209.85.221.43 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-f43.google.com with SMTP id ffacd0b85a97d-33e742ca96bso845929f8f.3 for ; Fri, 08 Mar 2024 03:18:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709896723; x=1710501523; 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=uwlzocWJiHgoQscu/IevEQ9ciKsE6ki7xCF7izVWXbo=; b=KVZP88vrlEQPp2sORyjXtpoxv3vPAYVT/XTUBbtV47ovwTp0YHqdpgLrGhUlg82eD7 PFP6zQGcv5CzFtWNJqskL1nTWZHfro6TGGx1MYNfFxKF8DLq3Ha3v9ELtEMB4LXiQN09 t7Xqyfpo577eridg4OyzsNBjtC1wzLDGHEy9Bg9ky2c6DlCEk1/CEU7bk9QVnrJZUn6y 51tLNTeLGKICSuX+9vD3ol7Ms5VdgcexpqTjphvlF+joYiBXG0sJZFzMVQXvGJOQQ98O gy5PkiFpCFdeXGwdH2Oj1oTOsvCay1aW7z5DbKPrnCjpoYG3lkBghRbk/Z0wniBVdGw8 CrIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709896723; x=1710501523; 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=uwlzocWJiHgoQscu/IevEQ9ciKsE6ki7xCF7izVWXbo=; b=qrlai4TYN5zfoRudywvKyStR6QVybprfqnlxDv92+DqV6NntLPa5TRG5uB0kGQ09f5 4Fv5AVhAvCLLRoT8d2SucJQMAN0r8YyvgOVlEikiiV7IluOeuRxoWeD1IuqmF4LmqD+E kzC5kA5kdrtRvqVAi0Mcoz7PPaE7uEa5n9ktji41M4K7N2TCivXb/XaGR7GgR2IY9BCi UeiTKOlnyyTcJdCwUTtRKNI1L6xl71RHlnx+QNRU9VY12CXf/4ge24q+aopsqdnEM1El M1pB3Ds6fW2KkymnAgatskXi0ImFXRa/zTNaVLv0RY+TTlZlZAgp8DJ9pBqdN3thOrRf 2wpQ== X-Gm-Message-State: AOJu0YzXyBTS+CwYPwXRTzDBKGMQ0ZROzM37bZsDBXiqXD4eCJX9R9ik O76dFtdhLMTUlvn0FDGNZc2zRLw0cBb1sFnWokcOpmv1oInMYiJaYJpNpX86kwo= X-Received: by 2002:adf:cc06:0:b0:33e:6ac:691b with SMTP id x6-20020adfcc06000000b0033e06ac691bmr15139647wrh.9.1709896722553; Fri, 08 Mar 2024 03:18:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:18:42 -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 10/13] sched/balancing: Rename newidle_balance() => sched_balance_newidle() Date: Fri, 8 Mar 2024 12:18:16 +0100 Message-Id: <20240308111819.1101550-11-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. 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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 95f7092043f3..aa5ff0efcca8 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4816,7 +4816,7 @@ static inline unsigned long cfs_rq_load_avg(struct cfs_rq *cfs_rq) return cfs_rq->avg.load_avg; } -static int newidle_balance(struct rq *this_rq, struct rq_flags *rf); +static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf); static inline unsigned long task_util(struct task_struct *p) { @@ -5136,7 +5136,7 @@ attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {} static inline void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) {} -static inline int newidle_balance(struct rq *rq, struct rq_flags *rf) +static inline int sched_balance_newidle(struct rq *rq, struct rq_flags *rf) { return 0; } @@ -8253,7 +8253,7 @@ balance_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf) if (rq->nr_running) return 1; - return newidle_balance(rq, rf) != 0; + return sched_balance_newidle(rq, rf) != 0; } #endif /* CONFIG_SMP */ @@ -8505,10 +8505,10 @@ done: __maybe_unused; if (!rf) return NULL; - new_tasks = newidle_balance(rq, rf); + new_tasks = sched_balance_newidle(rq, rf); /* - * Because newidle_balance() releases (and re-acquires) rq->lock, it is + * Because sched_balance_newidle() releases (and re-acquires) rq->lock, it is * possible for any higher priority task to appear. In that case we * must re-start the pick_next_entity() loop. */ @@ -11493,7 +11493,7 @@ static int sched_balance_rq(int this_cpu, struct rq *this_rq, ld_moved = 0; /* - * newidle_balance() disregards balance intervals, so we could + * sched_balance_newidle() disregards balance intervals, so we could * repeatedly reach this code, which would lead to balance_interval * skyrocketing in a short amount of time. Skip the balance_interval * increase logic to avoid that. @@ -12277,7 +12277,7 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { } #endif /* CONFIG_NO_HZ_COMMON */ /* - * newidle_balance is called by schedule() if this_cpu is about to become + * sched_balance_newidle is called by schedule() if this_cpu is about to become * idle. Attempts to pull tasks from other CPUs. * * Returns: @@ -12285,7 +12285,7 @@ static inline void nohz_newidle_balance(struct rq *this_rq) { } * 0 - failed, no new tasks * > 0 - success, new (fair) tasks present */ -static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) +static int sched_balance_newidle(struct rq *this_rq, struct rq_flags *rf) { unsigned long next_balance = jiffies + HZ; int this_cpu = this_rq->cpu; -- 2.40.1