From patchwork Fri Mar 1 11:09:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ingo Molnar X-Patchwork-Id: 208780 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp1003220dyb; Fri, 1 Mar 2024 03:12:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWcLP7LhTJl+BpBuCeGaiFARNPPz6RIMzu8dG9OB/j8jk5XcZ4x1tq4gR6AxXG112xnwBJbqR214eJ6QTyZnOcYyx45kQ== X-Google-Smtp-Source: AGHT+IFj+ZWcYvddPFQRA5UMnxMVrTUC1wcjO7z4KJpWNIEf+2bfRe8Q7eVu9Gk0X82W7J8O55NW X-Received: by 2002:a05:6870:218c:b0:21f:1a0a:8d59 with SMTP id l12-20020a056870218c00b0021f1a0a8d59mr1501783oae.22.1709291540465; Fri, 01 Mar 2024 03:12:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709291540; cv=pass; d=google.com; s=arc-20160816; b=sDcbJYheZvEKbhxgg1SXDEO9QNP7LUprrUt3KRDrIaSXU0laSZX3DIAHWHxirbOQT2 gTruaXLYJqlsCq/tHOewlaNG0DF1/aHK5kvC9WI4SeSahHpL1OpOihNB87GsIWLCKQs7 0PGc7ApERLJqjwnaAtr7SdngNdcHenabqFVzDWQkG/GICvJUJuguVi50OzVddMIf/BrG tVYmYuydMfgEQF6HRH9h5ndBi35zRt/1qJcbP0+DW3B7Z9x7hPc0PDQcqsMzynDdMTLn 1pJ6o2iT7IkL5uk/vCUII8/r91jafQE9pGmUcewTXuJQJZhiZdzVJH3/0wnEA8lxH86O x7dw== 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=AYC87+AtGNvd7VAVI78DNZ/P2pttTkG+THLM0HRfjPU=; fh=1xZ2Xkm2EmvJfcslDiEKzF4V2MCut/QeyxA5jmrN7us=; b=SUvy2QN0E6Og468V9Z9/hWBSAKk0A2IrJKYVSdWN5T33GJiNpeVYAaaQC7OximN8tw IaOP8lQiuVlPZzPDFksVp4V/V/cXMUx0EDfdLpM3vGCeI1/SskjaAzehQRsoGLQHcaK4 dSWA4HveWWeWUSmDDCrjY/tVF6BJc6NhV0kO3A87Wy3mAdTY7r6xgDG6JDioVy3yJ+os Ua1OVB1lrvZ6x7vev6hyyWpmic4EnWa6ZTzdlWw6hUO1bFQvXBfVbrNptI3QxVx0lf/W D3hH9KdCOUl/WPVx7Ir2bLj2NCiJD4qQT+GjUAdhHGQ5B4HjcOokelijhuKrLpW+8Y/X GqhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IOCObmiD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88304-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w19-20020aa78593000000b006e5078ce5f5si3168592pfn.35.2024.03.01.03.12.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 03:12:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IOCObmiD; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-88304-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88304-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E34A0288653 for ; Fri, 1 Mar 2024 11:11:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11F0E6EEF9; Fri, 1 Mar 2024 11:10:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IOCObmiD" Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (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 3B8FD6D526 for ; Fri, 1 Mar 2024 11:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709291407; cv=none; b=J5EuqM5Ub1Wsif0yq+k1ILC5cIvsGf6eDCrDEOm9Enzx9T9UH+WlPRsMPpe5IsCQ5pA91D8TPKDe2xiKhwI005wUe8uAiBNkVDbOAzNH5kl3xAxqURVyWdsUkb+ZfQu9xXEAyFHmZDYBYizojr8Wm7unDWi1NqRM3hz43URyGxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709291407; c=relaxed/simple; bh=VDa2JdCTxD1j1f4It6rpxinY5I86VrDhb2Fk6B2iY9c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=D/1yW2TK/bsmmt0qo+/OmPwMJ4MMVxlGOk5IzuCDnABXEx6jFWh2LEutB5bJaEbkQMqgcS1xg4/kGqUuijnelm6T+OP30l/+oRgS0KnqMA2/0gPYrgXPPckp++SutK9VlmFhRhtFxXO4r5wo0fmYh26qsubpfiDt2lHJJYaE1wk= 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=IOCObmiD; arc=none smtp.client-ip=209.85.208.173 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-f173.google.com with SMTP id 38308e7fff4ca-2d26227d508so21790631fa.2 for ; Fri, 01 Mar 2024 03:10:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709291403; x=1709896203; 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=AYC87+AtGNvd7VAVI78DNZ/P2pttTkG+THLM0HRfjPU=; b=IOCObmiDfhvDuoi1Jc+G60zlPKDmuyZO/bJcuY1w9hdKepoHbxTuvsLjTM3v31n1t3 6zc5UMVJot1uEl51+a19zLT/KenmxlO2Rv83Y/NHT3+Zff4w10N3eQSat3jmP8zWa58Q 1/vo6z67YDg92fbKGvCQMWp2G1J2vuPnFSB1y/bmKEwr/xXr4sttdrcMTpadPeJkeVPW m9acDMJS+YGgUvAiNDjVM8wDh08euYNp+g0yzDMAfyvY41col29znCinjP4zA8ORNWpL mX4mNdrncXP66T2cURanOaIoJ+7j+1300aQZmeS7UOKUX/zY5ay5ckSp96jnRd7EodBk Ukvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709291403; x=1709896203; 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=AYC87+AtGNvd7VAVI78DNZ/P2pttTkG+THLM0HRfjPU=; b=uSz73WCRkY5tAplsTHa/J9HxPvfZuWeKqeJFGFd+DP2oRLfl9Z7BqAIAo0CdPYKZFX iFtNVZhbchj616yDBPnBn43l8JMI9vIcgiVP1W5FVTwmxr7ml/bCddmABk/MC6AuEaoP G5pnMHk3z3nk/8USfKSyZaW1v0jgRr5Cd1B3wWwDu2W6qy729Lc3YnPbcnPPtq35lNvK NV7r0CD0VRAVbcAjTDjkWyafpANKZsJzDinYidT3KNHhEn0hCRUvTTdfXnA7cFnzfkYw t5gtBnFLSmGjHRYx0QZcltzjeTYmWHN8l8btEhRraIhNwWVigXWts5GEAYDPDHmcNxPN VzIQ== X-Gm-Message-State: AOJu0Yw4Gy/N348cKBeUHnMyAuD/tad+4kkrNMSrtAXZoDGV9GfYNdhK 7w3XadccFylxTb7A42rC/N/j28ZsYEiyP5AO6n/pBOgrN+QSLKlDpXxhWoz7ySU= X-Received: by 2002:a05:6512:1193:b0:513:2447:d110 with SMTP id g19-20020a056512119300b005132447d110mr1238559lfr.62.1709291403428; Fri, 01 Mar 2024 03:10:03 -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.02 (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 7/7] sched/balancing: Update comments in 'struct sg_lb_stats' and 'struct sd_lb_stats' Date: Fri, 1 Mar 2024 12:09:51 +0100 Message-Id: <20240301110951.3707367-8-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: 1792322086018701831 X-GMAIL-MSGID: 1792322086018701831 - Align for readability - Capitalize consistently Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Linus Torvalds Cc: Valentin Schneider --- kernel/sched/fair.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 99495c93e094..4e58b9334d88 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9433,17 +9433,17 @@ static void update_blocked_averages(int cpu) /********** Helpers for find_busiest_group ************************/ /* - * sg_lb_stats - stats of a sched_group required for load_balancing + * 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 group_capacity; - unsigned long group_util; /* Total utilization over the CPUs of the group */ + unsigned long avg_load; /* Avg load over the CPUs of the group */ + unsigned long group_load; /* Total load over the CPUs of the group */ + unsigned long group_capacity; /* Capacity over the CPUs of 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_nr_running; /* Nr of all 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 idle_cpus; /* Nr of idle CPUs in the group */ unsigned int group_weight; enum group_type group_type; unsigned int group_asym_packing; /* Tasks should be moved to preferred CPU */ @@ -9456,8 +9456,7 @@ struct sg_lb_stats { }; /* - * sd_lb_stats - Structure to store the statistics of a sched_domain - * during load balancing. + * sd_lb_stats - stats of a sched_domain required for load-balancing: */ struct sd_lb_stats { struct sched_group *busiest; /* Busiest group in this sd */ @@ -9465,7 +9464,7 @@ struct sd_lb_stats { 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 */ + 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 */