Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1732554lqg; Mon, 4 Mar 2024 01:51:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX8FcCQC2WzHc2gv6c44wfeSa6epedPcsr+cIuiz+GNLxM093Dset9D1H3Po5RmN9EMH50iHNV4MjfBFhShq2egqX8h9cCG4pJmraoqvA== X-Google-Smtp-Source: AGHT+IEZyhB/9piczqFpIDdzdSFRZW7eKGALjDDXGeoYEN0OwgY8WqznncHTTbvKlzK6RSIZDvwz X-Received: by 2002:a05:6a20:9390:b0:1a1:165c:bd8a with SMTP id x16-20020a056a20939000b001a1165cbd8amr7349342pzh.31.1709545905150; Mon, 04 Mar 2024 01:51:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709545905; cv=pass; d=google.com; s=arc-20160816; b=MbGwFQESsg+rRItQOuT/zz4k7amgYFWTNRhWEyqIH5jwF3qXwxQjWT7ZxAWeRQGn8p EtXw9KBMJfD3holCk1vfukUxGDEbNql71og6ECcTAMuAODptXIb6B0eRQqqqcXrnvBFf +bjTih3SxJ2ME/VepIogQFGnEdWdICSMywMr/PIYlFC4G6XkdNHS7QA8hxG34lzVXhUO MSaWVB6/mef5kV+YwDkSE7H4Jn6W1E2TSamLuUWDsFsXzEl/KfhCKnBziMOGLh9R3SEy IV1qpsn3TOg8eIiYUXUoCBbWQrL5CzRO+AwoKK6L3d9EJDsSCMATVqinBrx7xpzv6BjE KFDw== 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=eaJ13RYdVXWmZbDkVn4tVEtiI++AgEDK8GYib1p9JJ0=; fh=vtn8BV17FxZCrT5lfDoFHvvFiNhej5/zWe1lGP7P6Og=; b=aQRxZNhP5ug6GrUDksyM+15KdX8AZpXUU0blW+0Pkn8NWFlQB/WvpA0l4WQn6qJlr2 zIC4R/fDrhRwiK0LT9NNCUT1ut6kKJf9MXWHFcOGNGTQbfGmXC9P4oqzQ6a2jms9JcW0 JPEBLotjalxFpD0Wa6DM2GKs9q5dkWtMg1qRAqG2ppDo+D3Yt/L4iYCUU5X7QbFydwJT 2nl/t7pJR2ToHvINz2DO9V7zaQr683+wZLIfkCMGM09GvGdAroiBwUEDx8KRX0XtqmZj D8G+61UQwn9+vHOQEG2DRRPaqujt9p6Q1YDKx6nt7URCcb4d748h4qn/91J7uu68Q1eB F3Cg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gOL1eoRB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-90354-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id v6-20020a17090a898600b0029b24831646si5760577pjn.128.2024.03.04.01.51.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-90354-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gOL1eoRB; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-90354-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-90354-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id C8CF2282192 for ; Mon, 4 Mar 2024 09:51:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC76C39AC2; Mon, 4 Mar 2024 09:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gOL1eoRB" Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.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 06BE93839F for ; Mon, 4 Mar 2024 09:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709545735; cv=none; b=BE7D6Raad1ajVTJ8BK8ctO68xRaDEwkZFgtYZ2tGunM0o94mc3KOCW9OC9giKXyMSR7gRWP4BpiL2yFwzTZW8imTUDh95X0/R+TmDJFjEylRme3spgSpdlda8WcXgkrDJ5APWmT9kYwqzsAPCscMOQc+5iyh9xTT93c0QAHGfzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709545735; c=relaxed/simple; bh=vdGrZwaI/Ookkfx04vBorgAmg1RU8pL6JYSXfdzQ9PY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=CDS5yVtvuUXj70p6fRLPx+vOElRCTcu1Cd4Htbx3M9cP2LXTSRtnUD2PPIIJbrFHUNmWw37TsObY/DuruxCpg75JiBEIrV0AmOLTvFYIWytrj2eY4g0+ANeA5xputcGG+hL9xZnA00GyeJ/pe80qJiIjoAzmsyJtfbU4m0WmVLM= 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=gOL1eoRB; arc=none smtp.client-ip=209.85.218.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-ej1-f50.google.com with SMTP id a640c23a62f3a-a28a6cef709so689876766b.1 for ; Mon, 04 Mar 2024 01:48:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709545732; x=1710150532; 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=eaJ13RYdVXWmZbDkVn4tVEtiI++AgEDK8GYib1p9JJ0=; b=gOL1eoRBVB2dUVJHDflLCwkLxEXuc0M+wNx0qTrFP5kx6eyHI66SOj9fw1D9AGknAR tKz/GKOmQuFpccgXUbRAsXQ7baqKpyOylLQXPmtz8hv1n/RKQGBhqv1mHdh1IZ42iIJX qHcS+nFyYAgViyI1v8hA/Pdqt0YKaIhu31VTbtf3FKuJGMows5bDTQAeagEa9OnoXYbn qyiaOaG3WrRP9fbqwHVSp7k5xC+RWJyA49o5VYKkFRsvwppD9WUZt5jGXoXU6BuGsAI2 695NDOPPOcNMzmLhj/lxpaaI2CCneQ95OhQSxRaomXpVcuscNrcX1BiatwbNM2bs29bf ZBZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709545732; x=1710150532; 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=eaJ13RYdVXWmZbDkVn4tVEtiI++AgEDK8GYib1p9JJ0=; b=htubOOkW/SxVu4cN+wHmcoItNWCj1+tow/1nEJ1XlVvz7KxpAkxgzACo6fiGKLpKrY 4SjygF63bDLuFN3Gh5UohZ6RFKU2LkmIB6K6e2dGvA0Ac5GTjH/k2dfFV/chNvDgGax3 MrH4R2qTOkaoEJif/HGboDCEhb/w/MwT7Po+lA8/QWdjrNFGz7vDnPDxeYHLRyyL3Ti5 v0B5PS4KGFUPzn7rtJS0loD+1f1eJZPkfbRfFN7AWYl7pWY6lgneYLtvuPqeNjX5AztU gNXTy3pwnzf0W+soS3hmI6IHXe14/ucK/iyBVyXJpB26GfCdKLFbMrdKuKdskiPYruYD xIrQ== X-Gm-Message-State: AOJu0YypeAy36Tg1dhtIrmcdxJvsaQ7hv1GBpSmvmrAg56HOmLRQs9ae L3wVsi1sKAfa6FXlt+XRPdktbE9KOyaBSAlIaft+zKSePEIYpoAVIsjEKeRLWFQ= X-Received: by 2002:a17:906:48c6:b0:a45:2038:4caa with SMTP id d6-20020a17090648c600b00a4520384caamr2023252ejt.76.1709545732374; Mon, 04 Mar 2024 01:48:52 -0800 (PST) Received: from kepler.redhat.com (1F2EF13F.nat.pool.telekom.hu. [31.46.241.63]) by smtp.gmail.com with ESMTPSA id s22-20020a170906501600b00a42e2bc82dbsm4569839ejj.169.2024.03.04.01.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 01:48:51 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Shrikanth Hegde , Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Linus Torvalds , Valentin Schneider Subject: [PATCH 9/9] sched/balancing: Rename run_rebalance_domains() => sched_balance_softirq() Date: Mon, 4 Mar 2024 10:48:31 +0100 Message-Id: <20240304094831.3639338-10-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240304094831.3639338-1-mingo@kernel.org> References: <20240304094831.3639338-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run_rebalance_domains() is a misnomer, as it doesn't only run rebalance_domains(), but since the introduction of the NOHZ code it also runs nohz_idle_balance(). Rename it to sched_balance_softirq(), reflecting its more generic purpose and that it's a softirq handler. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Valentin Schneider --- Documentation/scheduler/sched-domains.rst | 2 +- Documentation/translations/zh_CN/scheduler/sched-domains.rst | 2 +- kernel/sched/fair.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/scheduler/sched-domains.rst b/Documentation/scheduler/sched-domains.rst index e57ad28301bd..6577b068f921 100644 --- a/Documentation/scheduler/sched-domains.rst +++ b/Documentation/scheduler/sched-domains.rst @@ -34,7 +34,7 @@ out of balance are tasks moved between groups. In kernel/sched/core.c, trigger_load_balance() is run periodically on each CPU through scheduler_tick(). It raises a softirq after the next regularly scheduled rebalancing event for the current runqueue has arrived. The actual load -balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run +balancing workhorse, sched_balance_softirq()->rebalance_domains(), is then run in softirq context (SCHED_SOFTIRQ). The latter function takes two arguments: the runqueue of current CPU and whether diff --git a/Documentation/translations/zh_CN/scheduler/sched-domains.rst b/Documentation/translations/zh_CN/scheduler/sched-domains.rst index e814d4c01141..fbc326668e37 100644 --- a/Documentation/translations/zh_CN/scheduler/sched-domains.rst +++ b/Documentation/translations/zh_CN/scheduler/sched-domains.rst @@ -36,7 +36,7 @@ CPU共享。任意两个组的CPU掩码的交集不一定为空,如果是这 在kernel/sched/core.c中,trigger_load_balance()在每个CPU上通过scheduler_tick() 周期执行。在当前运行队列下一个定期调度再平衡事件到达后,它引发一个软中断。负载均衡真正 -的工作由run_rebalance_domains()->rebalance_domains()完成,在软中断上下文中执行 +的工作由sched_balance_softirq()->rebalance_domains()完成,在软中断上下文中执行 (SCHED_SOFTIRQ)。 后一个函数有两个入参:当前CPU的运行队列、它在scheduler_tick()调用时是否空闲。函数会从 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0eb2cafa1509..cdf0dbb9d3e3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12408,7 +12408,7 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) } /* - * The run_rebalance_domains() softirq handler is triggered via SCHED_SOFTIRQ + * The sched_balance_softirq() softirq handler is triggered via SCHED_SOFTIRQ * from two places: * * - the scheduler_tick(), @@ -12416,7 +12416,7 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) * - from the SMP cross-call function nohz_csd_func(), * used by NOHZ idle balancing (with NOHZ_BALANCE_KICK set). */ -static __latent_entropy void run_rebalance_domains(struct softirq_action *h) +static __latent_entropy void sched_balance_softirq(struct softirq_action *h) { struct rq *this_rq = this_rq(); enum cpu_idle_type idle = this_rq->idle_balance; @@ -13217,7 +13217,7 @@ __init void init_sched_fair_class(void) #endif } - open_softirq(SCHED_SOFTIRQ, run_rebalance_domains); + open_softirq(SCHED_SOFTIRQ, sched_balance_softirq); #ifdef CONFIG_NO_HZ_COMMON nohz.next_balance = jiffies; -- 2.40.1