From patchwork Wed Jan 17 08:57:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 188725 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp778517dye; Wed, 17 Jan 2024 00:57:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGXU2lYefhY2uVaA5NhwnPbA6VxFXJP5o2UJk0FY2x5dYKAJqQsoYWL6Mv2Fl9CvVT1xFMs X-Received: by 2002:a17:906:369b:b0:a2a:632d:d67e with SMTP id a27-20020a170906369b00b00a2a632dd67emr2866040ejc.153.1705481857064; Wed, 17 Jan 2024 00:57:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481857; cv=pass; d=google.com; s=arc-20160816; b=N/gtY0EgkRCS+iq1lGYQLEthM913OvJlzqySllvGub5WCkO67X6dGqwgGs4ZCBkwBe Ni9kbD5W9pTrpf0qFM4RdSzQXcPxvM1Fonldk1G+jVxSm9LPULa+nd7PkdKaaE3YqmlY VyeXxc3ARxfKcD0sdgEb1UY9RGwyGWBptFt5Vr8xOuLUHrYMVB8JoAqloRu9BUNG4lF6 kvE8FIxhEdmD+w93PcZZCboaWI1HOQnZU5bh+7GGB5itbpvctQw+xfyzHZQzRC8p/j2o 4wOmt/98/1It/rJ14PiBEGZggRwIGhpSXLk9ASUJPQAdXlpipb7TyHp1q8SfmIHiEZr6 oMnQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=DwYa1xnpk22iDLsiHLRnr8TLtDUAuNYuVuVF+UdRbZg=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=wDYeVDExEKXemLoa2Y9ZQxYGSAfGt7ewIMytcOJ6LNTEOXNOrd5EvZqjN4dnSptkMB W3EJGwBbfUBM7PXNlc07EDuXA6GhWhsiSaC1Ry6pETB+iV0yxAWneYQCd1nWSjwIyxJn c5mojSOp0m2zhSXfrgSBikQcC7r7ZtGZ3DdsNmxSknFFgCX/h+K+u4/8YqDdeJdnlCMh iKlFUXn+zaMmnd2dvfoLtndvvgtHmI/aVnFlR91juPQSBT+zTlRn6HRnA5tbaU8Hyz55 sTcSj6sC/JFYDotXwwg6Jj9RuNBT3iOQ5URbYsXA0cZjVzUHhTSLHLfTGyuf6NdzQ+eO bwFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=vMSwTiSE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28672-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28672-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 p3-20020a1709061b4300b00a26eea528f6si5563767ejg.324.2024.01.17.00.57.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:57:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28672-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=@kernel.org header.s=k20201202 header.b=vMSwTiSE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28672-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28672-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 AA8B11F26392 for ; Wed, 17 Jan 2024 08:57:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 28B961DDD0; Wed, 17 Jan 2024 08:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vMSwTiSE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 815BC1DA35 for ; Wed, 17 Jan 2024 08:55:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481753; cv=none; b=Xf4ygtRxRRuCzCKz+AzGGpyt/Ty74iejZ1T0v5EFlI13sW9G9DzoOikD059vEca6neruZFx3RR7PHpyWj3uTtrv3MfEk1YISNpiwwfcOL3de5nVSOsF/neyofNGyip17HMBhiEER6h58XKhHwXpjU257vcgedJPuUQdwZeOfZ7Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481753; c=relaxed/simple; bh=ltCPr/DlS2muB/OH0aa1wXxHVPnZQoXrm0LhWbnST9w=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Transfer-Encoding; b=Olj09pofKJ97o7aJNy0WuIbpZMIfKcZQ+ne97RBTEwEEre+vGhODaznLx+7aWVG0ioMCrtT7ATWjrcyT5KDglSp6k4UwNVU5N0NdqS/YxeW9aO/2SBcfp9lyFAOkL2ApqoV767V2w0sowDudO7sBAIdeK9xEjU0BBnepUXFKAII= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vMSwTiSE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4614CC433F1; Wed, 17 Jan 2024 08:55:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481753; bh=ltCPr/DlS2muB/OH0aa1wXxHVPnZQoXrm0LhWbnST9w=; h=From:To:Cc:Subject:Date:From; b=vMSwTiSEvzAl1CTb6V949eMaLgh8Mqx/PvR7YhXQmiXztNpNLZv2S9kn75gPDn9ls v9L/XOqAMq6i7DfrLzzpyJ0wB3E2SqonhTNtkzJSkfLfE4ECPZJ+72KMVMRSa2YoJ5 CCU4GNeUO3v9tusdhlaBos4Qx9hLW1YSFk/zjvIS5oQTSTjgVb/wA29Syraf4qc2+I cn5aGwqlPJjmwW98hBBBnAF8kjcOYE32KS64dTOeAKnb2MOb45lRRcnKfpKr2syAKI W9ujdwgFhUj4KdqsvyQWAvugWLQmnAbI3DGxqYLotUOCHHdP3A0AkWNQQwJ5yByzQT c+7+JDxWLiEUg== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 1/5] sched/fair: add SD_CLUSTER in comments Date: Wed, 17 Jan 2024 16:57:11 +0800 Message-ID: <20240117085715.2614671-1-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 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: 1788327343991066924 X-GMAIL-MSGID: 1788327343991066924 From: Alex Shi The SD_CLUSTER omitted in following TOPOLOGY_SD_FLAGS explaination, add it to fill the absent. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot To: Juri Lelli To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 10d1391e7416..c342c52b1f34 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1554,6 +1554,7 @@ static struct cpumask ***sched_domains_numa_masks; * function: * * SD_SHARE_CPUCAPACITY - describes SMT topologies + * SD_CLUSTER - describes Cluster topologies * SD_SHARE_PKG_RESOURCES - describes shared caches * SD_NUMA - describes NUMA topologies * From patchwork Wed Jan 17 08:57:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 188726 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp778588dye; Wed, 17 Jan 2024 00:57:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IGA91XZM2j5Uq/KXtZGBonVOQl5zYWJ0ttuqiRFjhEEqqTQIvTepMlLNgMgNPiWU9prhl/y X-Received: by 2002:a05:6358:415:b0:174:b1f1:85bd with SMTP id 21-20020a056358041500b00174b1f185bdmr5688837rwd.39.1705481871854; Wed, 17 Jan 2024 00:57:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481871; cv=pass; d=google.com; s=arc-20160816; b=J9nj/WMts+Zk0bDwtA43VFTXx2q8psOV8/y6zwca5Azbbr1ixv5inSGZbqCrzZeiZF WfA2kjlXssr8ZfZUGl05so6dMC+cS4DwJG8xMvPF5r4sY4LX13DLJklE35oru6hR5+oX DdO479EOZScQO8tT3L7E36faCMbGsbaCZLZLQzW920utCFMBsVYUoS8S4o86ARDmPMRB ioltk3MrTEnrZ2XynMu2NMYGRWJaz+NKxc3ynsJ0RFyaTlPGFpB7L++iEjQshLkcEhuo 18DXV/dJCXpD3BQGCgW0jAgynpWgQBQ+5CcYg8+hKxh3Fy/2pXe4XRawVYppzbYknBF2 GYpQ== 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:dkim-signature; bh=PlAHTj7ixrkXoxKN4kr+Q6lS3AByIpzUspdeFL7oqtY=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=rB969zFfM4HzvbUY+/qUnVWgI3zHoSE8zydfRMl7EKc/DPUBlLt/zJjp7GZMl37D1/ BFvTFHS+y4enxRljyNS3GnPfYdVeeTgjARSuOf7wGpXBKxw7C9+Kxc3GO+OKYwvGWwCX psEJxpIIpH4nOtdGeLBw7QmxN9LiGL0trrqwzTSToJ/gvRZQ8NdEYQTatkWw/pAIcpWS YuU15+aLPaunBd0nLC6lyOAnrfs2pQkWUcung8uxmY30L80pYchBPOokbN/y1PrBaNSd g/I2JpLjytm2n+OIxnvXB1tgy+70zMQGKoleA5ENzo2TojL7oHIW2ruKYb3xJRsNmeXO hsVw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sr4207a5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28673-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28673-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. [139.178.88.99]) by mx.google.com with ESMTPS id i17-20020a17090acf9100b0028bbcd027aasi15863361pju.94.2024.01.17.00.57.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:57:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28673-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=Sr4207a5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28673-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28673-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 984D8284859 for ; Wed, 17 Jan 2024 08:57:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D40DE1DDFA; Wed, 17 Jan 2024 08:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sr4207a5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 354741DDC8 for ; Wed, 17 Jan 2024 08:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481762; cv=none; b=dH/RMScGauWz3Tqz8x9zLFb1hr+2BLkWdUCk/rVfibdUAXwp6FZj/nplgId5WnfieLlTwib2QFiRMSOoUztpZ1NyUJgdqfXTtpXpquWzxPHf1B5A8Sg3nHI6YuQqDmWKUM099IOtgaKgQbLmeALJXUPZi0fQFQMRRelccMs6lvI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481762; c=relaxed/simple; bh=1gKV14yFhqUD2HBstqbx5w7q3LD/bVO0O+RqRHy8IH4=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=AXHo1F7XOnK1aYIeCqiogaVmKe1r2hUQEdmwGtJCqdhr2conx2ZPlW7Jl/b9jEmNDJaz8XQrQ1rd8tEIbeMiCL72oEzfJpJ7WLtT5twmQilELx79aOhrYqnPHLgeRhSQqxJ1i1cn8p7z9BayHqYqK9msdJPX7oTtfxKHKo8wM+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sr4207a5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47565C433C7; Wed, 17 Jan 2024 08:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481761; bh=1gKV14yFhqUD2HBstqbx5w7q3LD/bVO0O+RqRHy8IH4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sr4207a50yCvAIl6nyqEr2IDuKxVplkzQScr+Xb9bXG7YxCon8rmCgEIgJYJmj1+N rTyxiekUrGahQUF5ID/RaaPDjPoAPCPCztaRR7CHmDYIDMqr5Mmkxz/0St5M1zvQPf F7cGQYQYDMS/y9MakUZGDkbZqxYUej039o7BlZZh5u0mNccL3kNeaNp9NhO15Vx4Z6 Z6DeaL/uahPcGuICiAYAkiXPngYbp954pa2nZ3XNQwQL+Xh2Wh1BOp6br2nOse/Nh2 n0SGlMzpk/RKOMXFLQmdslkjMDOjczRQElwk6pV51A3NkfCx3ksx4hGerf7gCozq+c l/XGmc+3qdYOQ== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 2/5] sched/fair: remove unused parameters Date: Wed, 17 Jan 2024 16:57:12 +0800 Message-ID: <20240117085715.2614671-2-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117085715.2614671-1-alexs@kernel.org> References: <20240117085715.2614671-1-alexs@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: 1788327358797089001 X-GMAIL-MSGID: 1788327358797089001 From: Alex Shi sds isn't used in function sched_asym(), so remove it to cleanup code. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot To: Juri Lelli To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/fair.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 46ba8329b10a..8d70417f5125 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9750,7 +9750,6 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) /** * sched_asym - Check if the destination CPU can do asym_packing load balance * @env: The load balancing environment - * @sds: Load-balancing data with statistics of the local group * @sgs: Load-balancing statistics of the candidate busiest group * @group: The candidate busiest group * @@ -9769,8 +9768,7 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) * otherwise. */ static inline bool -sched_asym(struct lb_env *env, struct sd_lb_stats *sds, struct sg_lb_stats *sgs, - struct sched_group *group) +sched_asym(struct lb_env *env, struct sg_lb_stats *sgs, struct sched_group *group) { /* Ensure that the whole local core is idle, if applicable. */ if (!sched_use_asym_prio(env->sd, env->dst_cpu)) @@ -9941,7 +9939,7 @@ static inline void update_sg_lb_stats(struct lb_env *env, /* Check if dst CPU is idle and preferred to this group */ if (!local_group && env->sd->flags & SD_ASYM_PACKING && env->idle != CPU_NOT_IDLE && sgs->sum_h_nr_running && - sched_asym(env, sds, sgs, group)) { + sched_asym(env, sgs, group)) { sgs->group_asym_packing = 1; } From patchwork Wed Jan 17 08:57:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 188727 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp778681dye; Wed, 17 Jan 2024 00:58:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzbe3EBzeiB95FKqkI1nlN6DxLI0uu+S7mt//3DZ9Y4i2UJNra3KvCUAcBs4HHBlQSmu4N X-Received: by 2002:a0c:ca01:0:b0:681:7bb3:f37f with SMTP id c1-20020a0cca01000000b006817bb3f37fmr493219qvk.4.1705481886525; Wed, 17 Jan 2024 00:58:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481886; cv=pass; d=google.com; s=arc-20160816; b=x98GdShUvgZ37DjVG1nVpyBMiFfnEjt50/+Ms5Sy0gvNBsPZoQNwiOLfxpMskEi9gH NKEhFZBp0na1jieL+3u+5QDeV1LFByyIxZLD5jM/8H+wFgUpskamPOS1+1u37mIDNBdd MSTKEGTO/QqC2S5Aoq42v3+skTCH/tgtc5FLmyNr2dnRTY3XFCYNWI0p7bXnAC6aMinO Y4kOwp0jI16aD0AjdkgHno4blOSCkI/EV2bEGCJrcKahmTsrQf99apNZlzKWoiRQMdmm prjk70Cht09pCTQ9md+dpYQ8TlXOQQwtaOhLqlenjy+YWjphxZ4+LGpROItWT5Cz6Cwn y+ww== 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:dkim-signature; bh=8rKJxw+V9JYvW4wnJNhpRgzFKkJmMiRwDOgeYAGlV2Q=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=VG+1uDOT0Yk5OtCmMG0Ig2RuGAA67jbJYS4rG0pZOZz/HGKlIFuK2AVPjKrIfxF17U r8JefANUFwQI6acUa2IrZm4o+X961mmngj7i/kgPLsXzdBMoYI9J7xLm9mlamO5sIAJA OIT3epTZGrnkZasHi47mCCLBYU8xVHjp18wZ1ADJxxfies4zZ/mZuW2a8S1lwclKq519 8dfaizIPEcyN+d2SICSnpWri9qR8qO5VGBBtUNxhwlQ1KbTIhnPWjK/TyW/ox72qouIx thiz0Ne0SslFP2UHB1bEWqGmnxhMhOf/nqWZ+oyzl5llNLp3hXsO4Ki8aGSpjdxwEX7O 0uQA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DQPro8+A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28674-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28674-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x9-20020a0cc509000000b006794ec8bf24si11230889qvi.384.2024.01.17.00.58.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:58:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28674-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=DQPro8+A; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28674-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28674-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5133E1C21626 for ; Wed, 17 Jan 2024 08:58:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 724B11DFDD; Wed, 17 Jan 2024 08:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DQPro8+A" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD1D31DDF8 for ; Wed, 17 Jan 2024 08:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481764; cv=none; b=gvcwi45TSDf8Ny7TrwsjpygYoSX5g28CEl9WcfnWxhF3pnEdggEJyWQM+IZIW3o6d2DhKd2nRbj1sZYFx8FoxCWvpivg+nXoqxffmQmDKzMmukwTiynGPvTr+Q4wQGJVdYjIBjdTUIk/ifuAbUKGR4Zhf2pwiVB9hRdsKyq5FCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481764; c=relaxed/simple; bh=BpcqVNZ8ffNdT1y7g2xcioG/6BH0/8tEnBf+zOJis+8=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=B8E7sQbBSedzYdkcI7Wn10F/wE/8ImPJgF6TdzIK2cmVK772XxhQSU8pySyfuPg2l2FQ+z+dLhCegjwUyC9bg0DF4KjdhucRTo8A9PLQRX5QP0u/Dut2Km13qaIRy+tRRTsKW39wpgnQ4j+iZJlwjKj1+lr7UoPwqD9nBipbmY4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DQPro8+A; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0592C433F1; Wed, 17 Jan 2024 08:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481764; bh=BpcqVNZ8ffNdT1y7g2xcioG/6BH0/8tEnBf+zOJis+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DQPro8+AjYJWrqOdEO26JABPCXwg16DvQHdwmltEa6jJBIPVOdIeT+LwdRMd6odez BaX8yFA7cjBL28uQn0JIi5szxOAF0kL86Pqsm7/NgKajVvXZdtZ8hUGxU29TU5jSd0 GNcVpEyi5ZY6j1H+wj9LVjw9tRphXGgx51LOcf5gOQylT+PaaTMCjqm70EQOBW2Vwe J6ytRN/f9u8HPMvLL6vgQoHWHF+WLzbNsshcm/FET950r4Fem/AdhGcZq00m63vslG vWDT7+GUAfdWg3CL/1qjxDo+TyWn65tM4QepS28vldl+AHBuIFzam790YyDhW/EUE2 vDwAWvyzvjIUQ== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 3/5] sched/fair: cleanup sched_use_asym_prio Date: Wed, 17 Jan 2024 16:57:13 +0800 Message-ID: <20240117085715.2614671-3-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117085715.2614671-1-alexs@kernel.org> References: <20240117085715.2614671-1-alexs@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: 1788327374781361387 X-GMAIL-MSGID: 1788327374781361387 From: Alex Shi And simplify the one line code. No function change. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/fair.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8d70417f5125..ebd659af2d78 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9741,10 +9741,8 @@ group_type group_classify(unsigned int imbalance_pct, */ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) { - if (!sched_smt_active()) - return true; - - return sd->flags & SD_SHARE_CPUCAPACITY || is_core_idle(cpu); + return (!sched_smt_active()) || + (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu); } /** From patchwork Wed Jan 17 08:57:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 188728 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp778768dye; Wed, 17 Jan 2024 00:58:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnxFIfPen96P+mUwtk+5OTSF5k4euAtrmvMSSBoap71euLZmS8iP8nndJ0fobBFMwoA08j X-Received: by 2002:a17:907:c28a:b0:a2c:cdb8:66a with SMTP id tk10-20020a170907c28a00b00a2ccdb8066amr2538384ejc.18.1705481903180; Wed, 17 Jan 2024 00:58:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481903; cv=pass; d=google.com; s=arc-20160816; b=shLrpHghZUKhiyJ/XKLJ1p8KjNvMQXUcY6hEP/gdeerpBdy9ndqvCXo1AGoVOzlvTy 8ub2RO+/sJqD5iB9CxcfJEdgUkWcHOLgIFW9Kw7l2NMFE733rBiVTuzKbPyizqtr/VCw aDyR3WL9Ia7vdfLRhoOTcRJRVfxbpnIzCV7a9mdk1nb7i7LRTC+V08KBD5z3kfzGIHpR MAlx6cSEdXZw/OLjO+414Owxh78nA6dmVh0L9oGKEHuRTo+bb6VpLGv9DAyQqlkY1qz8 wyq95+e4pKT8x96uGnhxUqD1rlpe+bm74RdaIalNFP1FiSrZ24pq0qSIRO+o/ep5dMEf tKQw== 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:dkim-signature; bh=W6lP8T0S42iMGXlTlJotDW4Lzo/YGYP+UmON6nTC6KE=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=Dr1gHi2+Kyvxiyb3vsqOhpFIrMVdwoUKN/mpkh/ax+JPZRKLOK1rmnb1pVRNmA6ejg liTli/+AGoZ1zA9FAgOSJAlvl0KWIKAiGQik5vkK70w6KDYfPa0I5kpm9cF8siCtZS49 HkGnAQpnQ1nucsSCRCLXB5n+iqjvsIFOund/Lbp6zAH8wNJIhlByGO5xeyi2Qy/9auPe 07x1WA546VWN2EwHuT5dMeG/jhtoZxpj4Pj8N7Ro7EMmg85k6WlC8ndJDUUBic5p2ZW9 3d8MwqzvS69yJ5lTkiPIaKI/t6gKQ8qhhEeCEtIP4Bo9oIV+zichBkuaJRyQFOQzEzFm Y2gQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q5oOdbwq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28675-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28675-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 p3-20020a1709061b4300b00a26eea528f6si5563767ejg.324.2024.01.17.00.58.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:58:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28675-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=@kernel.org header.s=k20201202 header.b=q5oOdbwq; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28675-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28675-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 C88A11F266DC for ; Wed, 17 Jan 2024 08:58:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B2971DFFF; Wed, 17 Jan 2024 08:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q5oOdbwq" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDE521DFE0 for ; Wed, 17 Jan 2024 08:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481767; cv=none; b=klpbYHscCguqAkmbFE99gcpMJJ5uejt2yWPWOsLYM1EFfc0qkjCGwZ5EhBPyi3uRj4KatTutsLVcv2VRAOuk1neGLWUvuDs5aLAoqEkoYnLQMIuhcqDCPJjrXRPNvrcuq8nw4dI8jER7egM/Q2BQIpl/C71B87mQsUvtb5JPvFg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481767; c=relaxed/simple; bh=k/XnvnANSn1/1XeK7SQmCxa/M+A9XuFnbnGv+ODyieI=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=Hsv4KNCxLCig6Zn2UwaavQlTQd124tGqkmfnjtORxDi3d6LX6ofBNIvSy3ZpXCUOXpMHEcvxv4eIa6keds93O1np2y+DmTMq0/QkzOBSKgyaV/RvmsFwR1HTKN1zsKiMvpruV7/lo/rBHEoycylW6FppVgmgr8a/zTyz6gQR5BI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q5oOdbwq; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D5B3CC433C7; Wed, 17 Jan 2024 08:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481767; bh=k/XnvnANSn1/1XeK7SQmCxa/M+A9XuFnbnGv+ODyieI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q5oOdbwqQyQQafn4WtYMvSxEw4G3fIkEbcvuDzTS8o2SJkGULupMyVxN87xUfDv0K wcJoZ6EtcZ+/bZNKFROiDgqcXwvs2QK2Xe5CcVTyzeuSjzmG4TS3P9mH1ue5qp3MjQ wKctT0PrUMaey8rWWw73LBnPbY/jHoDmPNI8BWgTUWH/lvEb+Ogqus5UbR4IJPAI2y yvpFe/fpwpCH2RcTbilkAug1JvyVNW4tPOzqb706smaNzAX6JaTsovpVXghmMZh/Iv iRHKP1rzQCUgo0AcFFovvSOGeSXUWCWZ03Gi5xWHXP/CLr/vRfRAOXwlyzbJOjnMTx BBlGTRCh8CJlQ== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 4/5] sched/fair: add a func _sched_asym Date: Wed, 17 Jan 2024 16:57:14 +0800 Message-ID: <20240117085715.2614671-4-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117085715.2614671-1-alexs@kernel.org> References: <20240117085715.2614671-1-alexs@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: 1788327392386836286 X-GMAIL-MSGID: 1788327392386836286 From: Alex Shi Use this func in sched_asym and other path to simply code. No function change. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/fair.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ebd659af2d78..96163ab69ae0 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9745,6 +9745,14 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu); } +static inline bool _sched_asym(struct sched_domain *sd, + int dst_cpu, int repl_cpu) +{ + /* Ensure that the whole local core is idle, if applicable. */ + return sched_use_asym_prio(sd, dst_cpu) && + sched_asym_prefer(dst_cpu, repl_cpu); +} + /** * sched_asym - Check if the destination CPU can do asym_packing load balance * @env: The load balancing environment @@ -9768,20 +9776,13 @@ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) static inline bool sched_asym(struct lb_env *env, struct sg_lb_stats *sgs, struct sched_group *group) { - /* Ensure that the whole local core is idle, if applicable. */ - if (!sched_use_asym_prio(env->sd, env->dst_cpu)) - return false; - /* * CPU priorities does not make sense for SMT cores with more than one * busy sibling. */ - if (group->flags & SD_SHARE_CPUCAPACITY) { - if (sgs->group_weight - sgs->idle_cpus != 1) - return false; - } - - return sched_asym_prefer(env->dst_cpu, group->asym_prefer_cpu); + return !(group->flags & SD_SHARE_CPUCAPACITY && + sgs->group_weight - sgs->idle_cpus != 1) && + _sched_asym(env->sd, env->dst_cpu, group->asym_prefer_cpu); } /* One group has more than one SMT CPU while the other group does not */ @@ -11036,8 +11037,7 @@ static struct rq *find_busiest_queue(struct lb_env *env, * SMT cores with more than one busy sibling. */ if ((env->sd->flags & SD_ASYM_PACKING) && - sched_use_asym_prio(env->sd, i) && - sched_asym_prefer(i, env->dst_cpu) && + _sched_asym(env->sd, i, env->dst_cpu) && nr_running == 1) continue; @@ -11907,8 +11907,7 @@ static void nohz_balancer_kick(struct rq *rq) * preferred CPU must be idle. */ for_each_cpu_and(i, sched_domain_span(sd), nohz.idle_cpus_mask) { - if (sched_use_asym_prio(sd, i) && - sched_asym_prefer(i, cpu)) { + if (_sched_asym(sd, i, cpu)) { flags = NOHZ_STATS_KICK | NOHZ_BALANCE_KICK; goto unlock; } From patchwork Wed Jan 17 08:57:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexs@kernel.org X-Patchwork-Id: 188729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp778834dye; Wed, 17 Jan 2024 00:58:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXudDJ7BWCxLGoaGsqh38nEkQAeRjByx7FvFUO4SqOIklEMnoUk1Uleiufu+g5rlXiTi+H X-Received: by 2002:a05:6214:2265:b0:680:caa6:9612 with SMTP id gs5-20020a056214226500b00680caa69612mr9956711qvb.111.1705481917426; Wed, 17 Jan 2024 00:58:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705481917; cv=pass; d=google.com; s=arc-20160816; b=PPkfWpUZXFUC44FRK+AhKfGTGdkr5dPwEza87AazgwL34+E2juDdON9MbRI/S1ph4n YpQpVvkMSExLka7478YS2MoAujLcjpwFtTT3b4KUw/Yb5bo6dcUOk/cXg9NFMq4t2q0d iw2B9+1ocxNdq8RJIUvAXWSytb38S9+czn0BhLogWBCFDwwZ3yxQo/07q2Ays1WN/Y3/ 8rbiqci1hQInrpeCaCAGYlrnkcqAZpTAA4e/w59fsdwOSq/zRmz8WRzIPsVkv6YznOlb ltLkzfMFG2xLU6dncjrtA5pBZz7PV9N6Xpa0p/KbKPLEjox1SV0KAXbVXSJjZdwJ3WvA BL6Q== 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:dkim-signature; bh=8eaXaN9W+z+RV/+Wvdn/qMOUZFlsDMjbR+i4I7SQbyM=; fh=2ooNcWiF1wbXc4MOpItQ0J3HmpaFWSgX1s64XQR6nBA=; b=zlLGL4ofyb8wep9gp7f262SYt4uOVp9mLLr6qeQmXQT0MtFwqnhI7UzshFH0/cf1VE zp5bzrkytmBIOwMFXjwP4DZenV8UWR5FWs9kXMZ2qqwB/ga1jJwkE2i46VfLHWEAOkt6 z7sVFkHqBA8qgNa0WoIkp+pRRnrptNdoOazr4OusYyQIYhrkrKUWx2z06XxDdG1UrkZX 3Z7rkGCYku1+3jjyCi781GcqzqaoK9O/AYOy+JQPVctiJ9xHB5Gd0hDyGU6SAP3zZFSQ DCDhHO8L3U+u0dnk5i0FAmE8IpTj8b5Fue2+qnXZ8fbGBt2bQfZJJnZBwM2mYGq3g5Rk mAFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZW3q9q3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28676-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28676-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z20-20020a0cf014000000b0068179c93457si1179581qvk.350.2024.01.17.00.58.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 00:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28676-ouuuleilei=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=@kernel.org header.s=k20201202 header.b=ZW3q9q3g; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-28676-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28676-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 36BA41C24865 for ; Wed, 17 Jan 2024 08:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 03F261EA8A; Wed, 17 Jan 2024 08:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZW3q9q3g" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64C891E896 for ; Wed, 17 Jan 2024 08:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481771; cv=none; b=YF4LAzmCvA8ZcNHMG52drTD9AT/V4jlugn5j3PPSv8/BuGIhJJAfIMOVgtjag0UJp9Qxlb1dH/sPcYZiy/q29l0znThlNG6ZmzPFc7LhWkaICSiG2htjXhqnQkJqvbq8Hw02uZOQZje+99ZVLFi0Z9JViaSLQThU6gG338TX+LQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705481771; c=relaxed/simple; bh=KrafdORBylWfUZyJJ7GTGl+pw7Wfz9BmDb03nqcDl7U=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID: X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding; b=gSTEsXpa0FXSOkVnJVmsptvsOFW+uDsDS7AhVSPuGRN0MmKklwU5tDky9duq+lW0c5O3VF0zDx6atdE80e7BaJo6zexBxoCFCPe2dh5quemvcEUD1zulCnoQXARFScRZEvIY45iNpln+lUbe9Q1bbb4GYI3dBJqk4C4bopIxt4A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZW3q9q3g; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A774C433A6; Wed, 17 Jan 2024 08:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705481770; bh=KrafdORBylWfUZyJJ7GTGl+pw7Wfz9BmDb03nqcDl7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZW3q9q3g3FVDOfQNzQyNTbYXWYxPM4BmMJwsrIRyGMLhqJX81cvqJA8rzuao26L1r WWOJN1kdq8QpuIwZwSV6F+9ouxFdYmIV7ETzuKWJb0XEfyW9yfHd8+R7/F+Huo2Pb8 qvZMrJr+YGJqDXJTIzHPtcuk+2HM1wIeq/6SUhvqyVJ/8osFSJlaQdI98Sv6p7vvgT RvuXjP/YsimmZlUFglqCQqWzyNPc+/xpxSbBhNz4lkeTEtZCS+IXaS7uu9dtfxZ6iS TVLMT2HwyAPkvTKmpuifYrims9L2gy7ffAAKQLqaqKJ58B4VMIJ7PTCHoazTyKPvtR c7j/SMzXvyYsA== From: alexs@kernel.org To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 5/5] sched/fair: narrow the sched_use_asym_prio checking scenario Date: Wed, 17 Jan 2024 16:57:15 +0800 Message-ID: <20240117085715.2614671-5-alexs@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117085715.2614671-1-alexs@kernel.org> References: <20240117085715.2614671-1-alexs@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: 1788327406919771078 X-GMAIL-MSGID: 1788327406919771078 From: Alex Shi Current function doesn't match it's comments, in fact, core_idle checking is only meaningful with non-SMT. So make the function right. Signed-off-by: Alex Shi To: Valentin Schneider To: Vincent Guittot To: Peter Zijlstra To: Ingo Molnar --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 96163ab69ae0..0a321f639c79 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9741,8 +9741,8 @@ group_type group_classify(unsigned int imbalance_pct, */ static bool sched_use_asym_prio(struct sched_domain *sd, int cpu) { - return (!sched_smt_active()) || - (sd->flags & SD_SHARE_CPUCAPACITY) || is_core_idle(cpu); + return (sd->flags & SD_SHARE_CPUCAPACITY) || + (!sched_smt_active() && is_core_idle(cpu)); } static inline bool _sched_asym(struct sched_domain *sd,