From patchwork Fri Mar 1 11:09:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 208779 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1003169dyb; Fri, 1 Mar 2024 03:12:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWHcfSkTlQQL8JUo+AslWJyAWB2I91Edbqkycj2rLqQd1KCbeyjRam5Wr/jk/hE9HUJQ2rDefXKpY0YXlf+7hYZEAExMw== X-Google-Smtp-Source: AGHT+IFGOTMQOoL47n238DClMuK2B5rXVOBNxSRgu4jz2MnZ3qj8fmRDUZB+Qv2xiMRAdoy4habT X-Received: by 2002:a17:906:4913:b0:a44:b56f:d048 with SMTP id b19-20020a170906491300b00a44b56fd048mr51594ejq.21.1709291533961; Fri, 01 Mar 2024 03:12:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709291533; cv=pass; d=google.com; s=arc-20160816; b=HPIia4bN4Xx8qpGiACqe7FETA54Gv/bnkJItTdyfY4PNWujV0E5yjJ1NcuuNXEEDDd 2kgNKNEfZa4pF1noMc4AYBrXZPzQMQA4bD8BMya9pfw+h8m0q4fWpxz8HOIYOds6s+fJ 3mjE/8Rq5CXrBs6kZk/sc4Y9dDA0nISTxwVHWzjinznNZbMrE/+DVXa/zRSJI3oO2g9c s+TYD7j6VKa/4yQ6Wgm6xDGF06Tklvi0ylRYPCuPWRx0hmSSaj2A7M2foH0G2iUndqlt TVjjE6plcb4Gm3w/pY7nIdGAUBl3aMDWHfhPbv6QSGYH3fvvrgZZCAwBWMvpex3xnOX5 XpHw== 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=FsbzmPBgmd/PDvdJrOlCLNy3reKyEs/GH7VUyr30KAw=; fh=1xZ2Xkm2EmvJfcslDiEKzF4V2MCut/QeyxA5jmrN7us=; b=PzB96oCJq1ol+s6IOpWcTgT+D9O3JKfuQCnFbM7fWTuGsZATaULINP89P/dbJe22BE 4obAYcjrXEiKBt83idexXZumjdN46mIT8PHwqRco93fxBSgXeCgpd1H7LplCj30Nmcca CkfjH0Flpys49dCwLPIJCL4sbgZaI7J5M5p9MtfX3BwIn16YTK9vfkkPiXiD0isIDEGi pd2p7d+JJPdmkVoU+1dckn31Egx6ienQmkZNw4lpp1ZOIdVQreMxMLa5HpbqJigcV9nM lNCoYS9FV3BwCot7HGA1jQFPGH/sTdmjPylE14AoBrK4jBnV4nF/tjiz2cJDKtT7MVdu XCCA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MH2QSPN8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88303-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88303-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gs6-20020a1709072d0600b00a447bbf17d7si608429ejc.309.2024.03.01.03.12.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 03:12:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88303-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MH2QSPN8; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88303-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88303-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id A8B671F21B70 for ; Fri, 1 Mar 2024 11:11:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A4EA66EB7C; Fri, 1 Mar 2024 11:10:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MH2QSPN8" Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (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 6BDE46D1BC for ; Fri, 1 Mar 2024 11:10:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709291406; cv=none; b=SGk6BgxaQhjxuwdtqCW3C4gcNdpaprzYGF+S/79DuMzoqDTHq4jlW0TO1Iy4sT2OHberQy2W16cIGaAYs1HRbM3YFHjlKFniqqgaSh5G/+kJMs9rXmjr85RYFhU0Mh9r+g0pA+P8VceDrr+k1kuAadrIaUGqAQ4qu53QUOFLcLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709291406; c=relaxed/simple; bh=trfivC8vG6hLXCya2zGOrWr40HQ6g3p1iNxASZJFkrs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Reas5GSkfbmi26M3q9vZIxmLI1w9oO6Xfxo1UnNLAA/xSi+6fYE20HE9gXfiyneqOXnEpl74GrYsrX4V1gGjZ/MficJafIkGCUYkcHXJ8Eifufvk/RK6BOA4ql5+QZpjbkv/821DkohhliV5ZAdJV9prScMZdm8IygZ7+0eFmMY= 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=MH2QSPN8; arc=none smtp.client-ip=209.85.208.179 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-lj1-f179.google.com with SMTP id 38308e7fff4ca-2d180d6bd32so20220081fa.1 for ; Fri, 01 Mar 2024 03:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709291402; x=1709896202; 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=FsbzmPBgmd/PDvdJrOlCLNy3reKyEs/GH7VUyr30KAw=; b=MH2QSPN8McSPaZM8MAoLJ5plo31CPRlIOkIBmdIh3MV9T1SPLH5pIgPVvD2+mBPluH 4ljb5w+Pp2e2WrviJz0IDVmoPNxfVeqLK6XpL+W0TdMFTOUCIVEeGNuHpFz3wgJJ8aDl v3Uwd5DX/bVpunGcGfSZuXRQ4xo7W8BvmIolA0PU7uFY5EZXh60q/vmUybCYaQ7s/WaT Jf7Nm2cIDwO1idutXsi0WFnaacX1fsMfTGSzUgMJ9EhxYVxvh1YgzAfQVIF2bBIpr7WE JpHwLLhc/ME7XbFd0vm4MF37wd4iUL22+A4goM/AVrsZ3pkws6rnH/9MATEWrPdlNdQf dVPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709291402; x=1709896202; 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=FsbzmPBgmd/PDvdJrOlCLNy3reKyEs/GH7VUyr30KAw=; b=HQdzrtbL2PvmMYZpfj5+PSLfmMwqTBKuaMCBiI7dFHYa208Hu7AhKY/5UUq1XfurFH bMYt3899RgK1HarD4uHgj1bN8uPmYXIU6xZh4AICzS5EM50e0RSj2W+0xlz62cL7qGAE AcXrPrW8OB0RiiJq/RNncgs3bKd7FNfghoW77+TLDBsZN+C5fJZe/8xeK6+iLqFJzelc 0w4WI5qBbCMw6YT1E3aPTsXiXkIbtHknM3MK+CiyBAvHlI2VopkB7pxH9UCirJZ0stfi FLUhDTbG1wBTcgkv+takwsxYXWds4nOVd3uocbe2FMHLJztPUV0ewU5bhCo0OPYtOA9y dQ4Q== X-Gm-Message-State: AOJu0Yz/oE8j1rgDfsIhU2Z17PCn0icsLM/sK41SKOZMBiyWdEnH+yBJ 680WnhrWCw/t7Ns8+/hhQmCa6G7U/9aDM51teQplgfbtasA6gygqiRT2WTt8p/c= X-Received: by 2002:a2e:b54e:0:b0:2d2:779d:3054 with SMTP id a14-20020a2eb54e000000b002d2779d3054mr931113ljn.0.1709291402467; Fri, 01 Mar 2024 03:10:02 -0800 (PST) Received: from kepler.redhat.com (1F2EF13F.nat.pool.telekom.hu. [31.46.241.63]) by smtp.gmail.com with ESMTPSA id b20-20020a05600c4e1400b00412cad66f8fsm490264wmq.44.2024.03.01.03.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 03:10:02 -0800 (PST) Sender: Ingo Molnar From: Ingo Molnar To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Vincent Guittot , Dietmar Eggemann , Linus Torvalds , Valentin Schneider Subject: [PATCH 6/7] sched/balancing: Vertically align the comments of 'struct sg_lb_stats' and 'struct sd_lb_stats' Date: Fri, 1 Mar 2024 12:09:50 +0100 Message-Id: <20240301110951.3707367-7-mingo@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240301110951.3707367-1-mingo@kernel.org> References: <20240301110951.3707367-1-mingo@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792322079791635085 X-GMAIL-MSGID: 1792322079791635085 Make them easier to read. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Valentin Schneider --- kernel/sched/fair.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 0e13b0016f33..99495c93e094 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9436,19 +9436,19 @@ static void update_blocked_averages(int cpu) * sg_lb_stats - stats of a sched_group required for load_balancing */ struct sg_lb_stats { - unsigned long avg_load; /*Avg load across the CPUs of the group */ - unsigned long group_load; /* Total load over the CPUs of the group */ + unsigned long avg_load; /* Avg load across the CPUs of the group */ + unsigned long group_load; /* Total load over the CPUs of the group */ unsigned long group_capacity; - unsigned long group_util; /* Total utilization over the CPUs of the group */ - unsigned long group_runnable; /* Total runnable time over the CPUs of the group */ - unsigned int sum_nr_running; /* Nr of tasks running in the group */ - unsigned int sum_h_nr_running; /* Nr of CFS tasks running in the group */ + unsigned long group_util; /* Total utilization over the CPUs of the group */ + unsigned long group_runnable; /* Total runnable time over the CPUs of the group */ + unsigned int sum_nr_running; /* Nr of tasks running in the group */ + unsigned int sum_h_nr_running; /* Nr of CFS tasks running in the group */ unsigned int idle_cpus; unsigned int group_weight; enum group_type group_type; - unsigned int group_asym_packing; /* Tasks should be moved to preferred CPU */ - unsigned int group_smt_balance; /* Task on busy SMT be moved */ - unsigned long group_misfit_task_load; /* A CPU has a task too big for its capacity */ + unsigned int group_asym_packing; /* Tasks should be moved to preferred CPU */ + unsigned int group_smt_balance; /* Task on busy SMT be moved */ + unsigned long group_misfit_task_load; /* A CPU has a task too big for its capacity */ #ifdef CONFIG_NUMA_BALANCING unsigned int nr_numa_running; unsigned int nr_preferred_running; @@ -9460,15 +9460,15 @@ struct sg_lb_stats { * during load balancing. */ struct sd_lb_stats { - struct sched_group *busiest; /* Busiest group in this sd */ - struct sched_group *local; /* Local group in this sd */ - unsigned long total_load; /* Total load of all groups in sd */ - unsigned long total_capacity; /* Total capacity of all groups in sd */ - unsigned long avg_load; /* Average load across all groups in sd */ - unsigned int prefer_sibling; /* tasks should go to sibling first */ + struct sched_group *busiest; /* Busiest group in this sd */ + struct sched_group *local; /* Local group in this sd */ + unsigned long total_load; /* Total load of all groups in sd */ + unsigned long total_capacity; /* Total capacity of all groups in sd */ + unsigned long avg_load; /* Average load across all groups in sd */ + unsigned int prefer_sibling; /* tasks should go to sibling first */ - struct sg_lb_stats busiest_stat;/* Statistics of the busiest group */ - struct sg_lb_stats local_stat; /* Statistics of the local group */ + struct sg_lb_stats busiest_stat; /* Statistics of the busiest group */ + struct sg_lb_stats local_stat; /* Statistics of the local group */ }; static inline void init_sd_lb_stats(struct sd_lb_stats *sds)