Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp470994lqc; Fri, 8 Mar 2024 03:03:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUjHF+14Yfhw+9JiW1alCG8cjniO0pyNOqPuANVzbE17kYcHf+12+mh5hBNyEWYPs9a1Ru8LSYXFK0faj3LzW+MR0INuruTK8smG2thqg== X-Google-Smtp-Source: AGHT+IGsZ03StCIxqGFelgCpO0dVfPOlF0bnvwvxCj20fIcEFwKVSm9NMeBlotoecmU7SKPVLn+C X-Received: by 2002:a05:6830:2052:b0:6e4:8c94:bf6f with SMTP id f18-20020a056830205200b006e48c94bf6fmr10589791otp.37.1709895825556; Fri, 08 Mar 2024 03:03:45 -0800 (PST) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s65-20020a635e44000000b005dc81a6b2b6si15968448pgb.782.2024.03.08.03.03.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 03:03:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96889-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=QBySYHTE; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-96889-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96889-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 20D55B23B2D for ; Fri, 8 Mar 2024 11:01:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B95F356444; Fri, 8 Mar 2024 10:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QBySYHTE" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 5123658239 for ; Fri, 8 Mar 2024 10:59:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; cv=none; b=gpDKoa/9k5y2b3o4rynY57grkVzqy0dgXn2F+G5TH9a6BuXCy/nsVQhKkBLWt1gyb8u8B8N3AVw1+UnUid9781XPdHsP5nbPWIVl4d9KQDUY5oXfVYxsCXf9vlbbHZ+LxM9WX5rIRuImf1JwbTbyFSZ1BXGRDEW0WVigX+HCp9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709895565; c=relaxed/simple; bh=A3rn/di0TQLpQiYh2AGCJI+ueeZiWtNVcO2Lb3sTkRQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VPR9yPPf+vd8ZnN3ty3IkgXxJ3dwz++nAOwU+TfD+n1FxBgeZghkS/WsWSfGDHUUJEBHaCEcxQUGyIqZHTQZXBlKpE5uGzwxHmwhwEfArjNJ6IWNBFhDRFjnZ71BOcnnqgUFOojDi/p16R/pgEmPyJQ2cuk5eG7fJy70rAEvQTA= 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=QBySYHTE; arc=none smtp.client-ip=209.85.128.42 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-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41312adc3deso10654895e9.3 for ; Fri, 08 Mar 2024 02:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709895563; x=1710500363; 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=AmmiIoTIOSqOS6k+PYGbdPJRqghLzMN0dL6QEudSlAc=; b=QBySYHTEFWqpIrifQ6f7VgPEmzf8YGin+3nuw0TjPdx7crmuy/lafgKZDkoc6JG5JZ QvVi59ug9JwSzjB70ZOveaNCQTT59NhR++sy1lectznZyLum4rVXlkjXI0b+2e4pBS0B vhF/AWf6GG7G87hJb08HpjQyPLakw4YXbYHy4TVbwoKiuKFjFC9XDQDX0he8AKjoCxI9 X1EMjkk5b8lxGOfN6zjHNsSBq6+4A2wC52tulDn03qlEXgYYTZhnlacqCoYp8DKJhRWs iJRCHmnvnIF20wuzSIhl0NlRkSUVomfPCYO/qsQdDmJcm/Nn4w9AMwRZrPgXtgv4nZE3 MN2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709895563; x=1710500363; 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=AmmiIoTIOSqOS6k+PYGbdPJRqghLzMN0dL6QEudSlAc=; b=nM1ITqX+zmbOqohO/WfOglW8rHqG/IJhPx2x80aFCfHPqaJIToksP1C3Qj+RsSEP45 83OJsCZbQb0r6esjS7V9lMW0iEGY7CMggkUNVEMAadh1FsNyEfyi5GpjtFn3m/c2KZeE y4QWhNIvgU0CwZmTSYp1vjhUlFGZ12k9p/7d2vnP/xXLLLnxSHUAr5UktOtM8YPxZpSH iAKVoI//VeqXg8HZU0WPmV/TWovqyQJ5/yntLl6jAs9PeXNFhWGVHA1BNL34CUY4eP84 FMVKDPfzaJ4D6miFQQfKwpbriP0r4TOtc+AUknXJa3pbUICG9Gy+zUeW40ypYZFuQgYj 689w== X-Gm-Message-State: AOJu0Yz6+NDQvJzES/Dob6ERn7Jljy+sWUM19b2PhUaVhfRN0VnyrOnw 4gZvwvPZGvbfRlqOZHoBh2g5mREJMGfarmpzjso6sVsJEk+zIV7C7ZsaxMHeGPE= X-Received: by 2002:a05:600c:1549:b0:413:1047:362f with SMTP id f9-20020a05600c154900b004131047362fmr3234852wmg.30.1709895562580; Fri, 08 Mar 2024 02:59:22 -0800 (PST) Received: from kepler.redhat.com (1F2EF3E5.nat.pool.telekom.hu. [31.46.243.229]) by smtp.gmail.com with ESMTPSA id g20-20020a05600c4ed400b00412f679bae1sm5632382wmq.26.2024.03.08.02.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 02:59:22 -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 08/10] sched/balancing: Update run_rebalance_domains() comments Date: Fri, 8 Mar 2024 11:58:59 +0100 Message-Id: <20240308105901.1096078-9-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240308105901.1096078-1-mingo@kernel.org> References: <20240308105901.1096078-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 The first sentence of the comment explaining run_rebalance_domains() is historic and not true anymore: * run_rebalance_domains is triggered when needed from the scheduler tick. .. contradicted/modified by the second sentence: * Also triggered for NOHZ idle balancing (with NOHZ_BALANCE_KICK set). Avoid that kind of confusion straight away and explain from what places sched_balance_softirq() is triggered. 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f3c03c6db3c8..b567c0790f44 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -12409,9 +12409,12 @@ static int newidle_balance(struct rq *this_rq, struct rq_flags *rf) } /* - * This softirq may be triggered from the scheduler tick, or by - * any of the flags in NOHZ_KICK_MASK: NOHZ_BALANCE_KICK, - * NOHZ_STATS_KICK or NOHZ_NEXT_KICK. + * This softirq handler is triggered via SCHED_SOFTIRQ from two places: + * + * - directly from the local scheduler_tick() for periodic load balancing + * + * - indirectly from a remote scheduler_tick() for NOHZ idle balancing + * through the SMP cross-call nohz_csd_func() */ static __latent_entropy void run_rebalance_domains(struct softirq_action *h) { -- 2.40.1