Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3078490pxu; Tue, 8 Dec 2020 03:02:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyvZxU3xi1LQU4ECAnCG9AL2IDMItckbzfEbkdeO7LrjvFZnOvDrr+Vir6a1X7mqcycvuVZ X-Received: by 2002:a50:dac7:: with SMTP id s7mr23942113edj.106.1607425350027; Tue, 08 Dec 2020 03:02:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607425350; cv=none; d=google.com; s=arc-20160816; b=XVnK7rhYzZWfrMrgOzuHTym1lmlvD7p1X+P9phKTf2GYCAoCzLd17+bcwdB3pRnioc JHmnNn1sOgU29v4qb7NUAW2qFyt2hvF1l62BxQoq7tKpxJYBEClL6KL8hxrTWD2jp2Zn ebnz4D+ntcU6yVyfXCbseBtRRMzXOHLMenvfu0txw74i0NfSimNaE5D5VibqhTPM3pDO q/66yDsK9l8Bou7KFSqkJKnDkQt6ZLqliUDx00VbNENHvdK0xvBpWc2F70xIyJt7QJ9X RRx+H+6qfWEFCOYTYMTCppVVmdH78kd7JgerDAUjjcdGj3oSRFvHFM0cHD3LMOT2V0Z2 breg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=fqfFnxCm+3epXr/dMbanoc8pP3W04eRZS0CHoFuRULg=; b=EEyZVSF1djc8szrlpLHKqYjj2gM1L62qHSYh3moekmQ+ql1aYFqkbdfgTr4otRil8c 3i77y/lu5eNQEvWpRaMgZjNUQoyIJQngLBd77hBoWz5VqUvKxPms3w+0zpYU1MZVE7+D AeTXrqJhBVpJF79SeXGrRs4oMfQY9/5Vdwg34R94TBgSbnDQMPzyduqgrmWUsCpvmCEz XmwS8KSfbr699vka+i8qswd6pivOXU2XRh5vUzjqAyezySQ0bylg3HJYWDq/wOwSoLBQ xrcc1alSmUwJtvnTEeow4247rLvbNwtqUaoY2mR9kl0pYywmJRmZl7WSMlyA4XlH92qy HULg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gu26si7204888ejb.461.2020.12.08.03.02.07; Tue, 08 Dec 2020 03:02:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728752AbgLHK7y (ORCPT + 99 others); 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