From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2F63C4361B for ; Tue, 8 Dec 2020 11:00:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E40A23AA7 for ; Tue, 8 Dec 2020 11:00:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E40A23AA7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IzwyAkmwH7JJnvfJwKRXLtUYSSQhrSPZZPvs42v5zDg=; b=Ml8Bc7cQnHQH35iPeU14Y8qbI MOFEjG9YfUBck+ocU8PF9xyh7WxNZZpSS/nKtqvqijUxBKUJO27Jgr9EfwTQT1K5xPF7VkjKonSPq rD23mbvGWhicAXi+KC1dmBh2wb29LdAmPj1dziQljjUvoGdknhGVj0sx0BDERpDlf8hnzobEuZ/oa JPqRtdCzo0JLpm6DSossRZWsWbSwxIIRlW4xoj7TCdYsRMY4IDK5JoEvWlDcPBmZiT2DjE3Duk3oX WdwO4TN5XD+ms0ThOU4HJ0TzGpvbSX88ER+L2XpNbs20uPHZO9aOhAgoarfOdDW7v+hMmOTz7x5fV 9/zB4NpGQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmaiB-0004ka-Iv; Tue, 08 Dec 2020 10:59:15 +0000 Received: from outbound-smtp20.blacknight.com ([46.22.139.247]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmai8-0004jU-Kg for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 10:59:14 +0000 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp20.blacknight.com (Postfix) with ESMTPS id 118E81C3AA7 for ; Tue, 8 Dec 2020 10:59:02 +0000 (GMT) Received: (qmail 22711 invoked from network); 8 Dec 2020 10:59:01 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 8 Dec 2020 10:59:01 -0000 Date: Tue, 8 Dec 2020 10:59:00 +0000 From: Mel Gorman To: Dietmar Eggemann Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Message-ID: <20201208105900.GG3371@techsingularity.net> References: <20201207091516.24683-1-mgorman@techsingularity.net> <20201207091516.24683-2-mgorman@techsingularity.net> <25a8c4bd-792b-2851-b10a-c4375eb83dfe@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <25a8c4bd-792b-2851-b10a-c4375eb83dfe@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201208_055912_780152_66D87EA5 X-CRM114-Status: GOOD ( 21.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Barry Song , Juri Lelli , Vincent Guittot , Peter Ziljstra , Aubrey Li , LKML , Ingo Molnar , Valentin Schneider , Linux-ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Dec 08, 2020 at 11:07:19AM +0100, Dietmar Eggemann wrote: > On 07/12/2020 10:15, Mel Gorman wrote: > > SIS_AVG_CPU was introduced as a means of avoiding a search when the > > average search cost indicated that the search would likely fail. It > > was a blunt instrument and disabled by 4c77b18cf8b7 ("sched/fair: Make > > select_idle_cpu() more aggressive") and later replaced with a proportional > > search depth by 1ad3aaf3fcd2 ("sched/core: Implement new approach to > > scale select_idle_cpu()"). > > > > While there are corner cases where SIS_AVG_CPU is better, it has now been > > disabled for almost three years. As the intent of SIS_PROP is to reduce > > the time complexity of select_idle_cpu(), lets drop SIS_AVG_CPU and focus > > on SIS_PROP as a throttling mechanism. > > > > Signed-off-by: Mel Gorman > > --- > > kernel/sched/fair.c | 3 --- > > kernel/sched/features.h | 1 - > > 2 files changed, 4 deletions(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 98075f9ea9a8..23934dbac635 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6161,9 +6161,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > > avg_idle = this_rq()->avg_idle / 512; > > avg_cost = this_sd->avg_scan_cost + 1; > > > > - if (sched_feat(SIS_AVG_CPU) && avg_idle < avg_cost) > > - return -1; > > - > > if (sched_feat(SIS_PROP)) { > > u64 span_avg = sd->span_weight * avg_idle; > > if (span_avg > 4*avg_cost) > > Nitpick: > > Since now avg_cost and avg_idle are only used w/ SIS_PROP, they could go > completely into the SIS_PROP if condition. > Yeah, I can do that. In the initial prototype, that happened in a separate patch that split out SIS_PROP into a helper function and I never merged it back. It's a trivial change. Thanks. -- Mel Gorman SUSE Labs _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2E16C433FE for ; Tue, 8 Dec 2020 10:59:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9AA8523AAA for ; Tue, 8 Dec 2020 10:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729175AbgLHK7y (ORCPT ); Tue, 8 Dec 2020 05:59:54 -0500 Received: from outbound-smtp13.blacknight.com ([46.22.139.230]:56139 "EHLO outbound-smtp13.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbgLHK7x (ORCPT ); Tue, 8 Dec 2020 05:59:53 -0500 Received: from mail.blacknight.com (pemlinmail05.blacknight.ie [81.17.254.26]) by outbound-smtp13.blacknight.com (Postfix) with ESMTPS id ED9B41C3AA5 for ; Tue, 8 Dec 2020 10:59:01 +0000 (GMT) Received: (qmail 22711 invoked from network); 8 Dec 2020 10:59:01 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 8 Dec 2020 10:59:01 -0000 Date: Tue, 8 Dec 2020 10:59:00 +0000 From: Mel Gorman To: Dietmar Eggemann Cc: LKML , Aubrey Li , Barry Song , Ingo Molnar , Peter Ziljstra , Juri Lelli , Vincent Guittot , Valentin Schneider , Linux-ARM Subject: Re: [PATCH 1/4] sched/fair: Remove SIS_AVG_CPU Message-ID: <20201208105900.GG3371@techsingularity.net> References: <20201207091516.24683-1-mgorman@techsingularity.net> <20201207091516.24683-2-mgorman@techsingularity.net> <25a8c4bd-792b-2851-b10a-c4375eb83dfe@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <25a8c4bd-792b-2851-b10a-c4375eb83dfe@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 08, 2020 at 11:07:19AM +0100, Dietmar Eggemann wrote: > On 07/12/2020 10:15, Mel Gorman wrote: > > SIS_AVG_CPU was introduced as a means of avoiding a search when the > > average search cost indicated that the search would likely fail. It > > was a blunt instrument and disabled by 4c77b18cf8b7 ("sched/fair: Make > > select_idle_cpu() more aggressive") and later replaced with a proportional > > search depth by 1ad3aaf3fcd2 ("sched/core: Implement new approach to > > scale select_idle_cpu()"). > > > > While there are corner cases where SIS_AVG_CPU is better, it has now been > > disabled for almost three years. As the intent of SIS_PROP is to reduce > > the time complexity of select_idle_cpu(), lets drop SIS_AVG_CPU and focus > > on SIS_PROP as a throttling mechanism. > > > > Signed-off-by: Mel Gorman > > --- > > kernel/sched/fair.c | 3 --- > > kernel/sched/features.h | 1 - > > 2 files changed, 4 deletions(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 98075f9ea9a8..23934dbac635 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -6161,9 +6161,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int t > > avg_idle = this_rq()->avg_idle / 512; > > avg_cost = this_sd->avg_scan_cost + 1; > > > > - if (sched_feat(SIS_AVG_CPU) && avg_idle < avg_cost) > > - return -1; > > - > > if (sched_feat(SIS_PROP)) { > > u64 span_avg = sd->span_weight * avg_idle; > > if (span_avg > 4*avg_cost) > > Nitpick: > > Since now avg_cost and avg_idle are only used w/ SIS_PROP, they could go > completely into the SIS_PROP if condition. > Yeah, I can do that. In the initial prototype, that happened in a separate patch that split out SIS_PROP into a helper function and I never merged it back. It's a trivial change. Thanks. -- Mel Gorman SUSE Labs