Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3300341pxu; Tue, 15 Dec 2020 03:49:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJyTyq4+rrr/68WJ98UMXLyPbwCcaM2tfmSP5/dQRKdTt7y5z06Z/Aj6ujT4it2CjTI5oLJ3 X-Received: by 2002:a17:906:bc9b:: with SMTP id lv27mr26003054ejb.505.1608032957989; Tue, 15 Dec 2020 03:49:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608032957; cv=none; d=google.com; s=arc-20160816; b=XOJJf5OiZwx28rSo6Q1G05Ik5VA/SAQTKUZm32rt8FLGiTMCaRVooyUezf8A3MZ84n oX0GBeTZ3aUC9B9Dd8+BU7dbzgxPxagKwV7NENotwz3LRwHQNCP5YBYSG24QI4RXMIJd 5bfNfuDdyAfD8v85mT3fUONs0+Brry26ShPcCSF0upnyP1fhn7NN86+vRwXeKoriuA22 2x+jc2XrZR0xiHcSXdr/laAQpDDp/DJkPYS/kRIjO4bH/CE/99LjoJNFYjsS9D+6MRA8 fzrhOSb1aDUKhOYgtzFDCz0Lj1dJzLjc1D7jKKEqweAj/NYLPidiOkPcJv0i2C+CyOfX Bgbw== 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=OHzNzZ+4IY4hDl86VSiek4n34hvIXzkNKkzwb7Th1A0=; b=ZdkELS/1POMP1jGE69EANvZeBkffWCrX8k8bcZ/CHLiFyXuvvhLUiU08tsfrtvw7r6 ofDVbGW+sWTaUj1tSngcXrzqVp9GN1HWIoPPxbx69Rsbog2H0xKTglsVDF2lIdDKT/FD QR7wvE579m8GF7YSXB8UjtfOzJ7eH/K6P82qlL/nAQ9UvP5fV10My75AkiVNcc4CMlHU sQrmbrTIKTMQvDCTUew+5iD8Vi6LoyclWO8KhUU5Abya+66KClU29e9ATMs53HPgG1/I 8OCiKNuCuPhWhqfSdxYCaB2EJVdlpGil6Zt4/vSaQ3BYG1z/04XBpf8Fmh8C+IjNZK+d F31w== 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 mh12si779602ejb.48.2020.12.15.03.48.54; Tue, 15 Dec 2020 03:49:17 -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 S1728734AbgLOLqP (ORCPT + 99 others); Tue, 15 Dec 2020 06:46:15 -0500 Received: from outbound-smtp62.blacknight.com ([46.22.136.251]:46201 "EHLO outbound-smtp62.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728737AbgLOLqD (ORCPT ); Tue, 15 Dec 2020 06:46:03 -0500 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp62.blacknight.com (Postfix) with ESMTPS id 23877FA92D for ; Tue, 15 Dec 2020 11:45:09 +0000 (GMT) Received: (qmail 25090 invoked from network); 15 Dec 2020 11:45:08 -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); 15 Dec 2020 11:45:08 -0000 Date: Tue, 15 Dec 2020 11:45:06 +0000 From: Mel Gorman To: Peter Zijlstra Cc: "Li, Aubrey" , vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, mingo@redhat.com, juri.lelli@redhat.com, valentin.schneider@arm.com, qais.yousef@arm.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, tim.c.chen@linux.intel.com, benbjiang@gmail.com Subject: Re: [RFC][PATCH 1/5] sched/fair: Fix select_idle_cpu()s cost accounting Message-ID: <20201215114506.GB3371@techsingularity.net> References: <20201214164822.402812729@infradead.org> <20201214170017.877557652@infradead.org> <20201215075911.GA3040@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20201215075911.GA3040@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 15, 2020 at 08:59:11AM +0100, Peter Zijlstra wrote: > On Tue, Dec 15, 2020 at 11:36:35AM +0800, Li, Aubrey wrote: > > On 2020/12/15 0:48, Peter Zijlstra wrote: > > > We compute the average cost of the total scan, but then use it as a > > > per-cpu scan cost when computing the scan proportion. Fix this by > > > properly computing a per-cpu scan cost. > > > > > > This also fixes a bug where we would terminate early (!--nr, case) and > > > not account that cost at all. > > > > I'm a bit worried this may introduce a regression under heavy load. > > The overhead of adding another cpu_clock() and calculation becomes > > significant when sis_scan is throttled by nr. > > The thing is, the code as it exists today makes no sense what so ever. Which makes it very hard to reason about or change in a "safe" manner as all sorts of counter-intuitive effects occur. The series is queued and running and takes 1-2 days. I haven't reviewed the patches properly (holiday) but it'll be interesting to get some provisional data at least. -- Mel Gorman SUSE Labs