Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp2372476pxb; Mon, 11 Jan 2021 08:04:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPt+jNu6vynEGX1gFE+OrAZUwaGmMNxP+uGzSnMh8R0Lm5j+XV2vYFHx5jYlf0vCQ83YtS X-Received: by 2002:a17:906:7f91:: with SMTP id f17mr106500ejr.81.1610381045544; Mon, 11 Jan 2021 08:04:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610381045; cv=none; d=google.com; s=arc-20160816; b=mRY+4Q8v1ca2rpQTgE95FIQiQi90o86KD487vVTWxeme44K3AtjbiFOJ9+WoceM8vF 1SIMdMqNoygj3RZX5IJlzvMrM8dNTCOtdclMTompBn7THVy3jbtoMAfMZvS7shRr3XJJ t3VEWIgSkNH4OedjT7CE93GVeKSJ6c2aYZDVVgvxNISMYo8hr9C/VPN353VoXCtIGoLk C/l5JLWrU2WxQplTrN5lYtPeRUA1lU7jc+4VpITLz9LP0i/DVscbbjD4FPAfFANHjO5K /eqPnqJ1HmClDI5RMchyy6n9FXC5NpSFepSj3ZVktKwXES6gmWwHe+rzoxyTFlk7dklu cD7g== 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=sX/k2QGzV+8G/vG/tH3xc5bdv7FLr9VzkqUF9r5RJ/g=; b=MFU7tbQMs/EAEjXSJrOkx51oq6kHSeCFjICfatPDg5jfaKmaXjPrOxu6ZQhzSDPr+M ul0ApMcEWVjNnm8RUQW6g+bE0ZZ3ybLE0sFQdHjMZlvj4nVoOnYLFtkHAqq4nc3Ma26b G5rKQdBjeBLDl3ylRJotXhT+4yKm0CoONEcBZaBkxpRxaJyaAnhjr7w8yeW2eXoAM5zB TKLeLyLNrs+XYuwPi90Pkn1uy/G2NYEZrsHAMhLyd4ilzcJorjRZSZwD2+bqWWhuKBz/ cEzPdcjbqZ05BjOkcNSVK0MeBfWRmoiCLLvpXvA+wG2/v/uwYzzDh7Hlg9C0U5kTdtnJ 2cxg== 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 cz3si66446edb.467.2021.01.11.08.03.41; Mon, 11 Jan 2021 08:04:05 -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 S2388852AbhAKP65 (ORCPT + 99 others); Mon, 11 Jan 2021 10:58:57 -0500 Received: from outbound-smtp17.blacknight.com ([46.22.139.234]:56371 "EHLO outbound-smtp17.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731804AbhAKP64 (ORCPT ); Mon, 11 Jan 2021 10:58:56 -0500 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp17.blacknight.com (Postfix) with ESMTPS id 6F8D61C34C9 for ; Mon, 11 Jan 2021 15:58:05 +0000 (GMT) Received: (qmail 15571 invoked from network); 11 Jan 2021 15:58:05 -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); 11 Jan 2021 15:58:04 -0000 Date: Mon, 11 Jan 2021 15:58:02 +0000 From: Mel Gorman To: Vincent Guittot Cc: Peter Zijlstra , "Li, Aubrey" , linux-kernel , Ingo Molnar , Juri Lelli , Valentin Schneider , Qais Yousef , Dietmar Eggemann , Steven Rostedt , Ben Segall , Tim Chen , Jiang Biao Subject: Re: [RFC][PATCH 1/5] sched/fair: Fix select_idle_cpu()s cost accounting Message-ID: <20210111155802.GI3592@techsingularity.net> References: <20201214164822.402812729@infradead.org> <20201214170017.877557652@infradead.org> <20201215075911.GA3040@hirez.programming.kicks-ass.net> <20210108102738.GB3592@techsingularity.net> <20210108144058.GD3592@techsingularity.net> <20210108161405.GE3592@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 11, 2021 at 03:36:57PM +0100, Vincent Guittot wrote: > > > > > > > > > I think > > > that we should decay it periodically to reflect there is less and less > > > idle time (in fact no more) on this busy CPU that never goes to idle. > > > If a cpu was idle for a long period but then a long running task > > > starts, the avg_idle will stay stalled to the large value which is > > > becoming less and less relevant. > > > > While I get what you're saying, it does not help extrapolate what the > > idleness of a domain is. > > not but it gives a more up to date view of the idleness of the local > cpu which is better than a stalled value > Fair enough. > > > > > At the opposite, a cpu with a short running/idle period task will have > > > a lower avg_idle whereas it is more often idle. > > > > > > Another thing that worries me, is that we use the avg_idle of the > > > local cpu, which is obviously not idle otherwise it would have been > > > selected, to decide how much time we should spend on looking for > > > another idle CPU. I'm not sure that's the right metrics to use > > > especially with a possibly stalled value. > > > > > > > A better estimate requires heavy writes to sd_llc. The cost of that will > > likely offset any benefit gained by a superior selection of a scan > > depth. > > > > Treating a successful scan cost and a failed scan cost as being equal has > > too many corner cases. If we do not want to weight the successful scan > > cost, then the compromise is to keep the old behaviour that accounts for > > I think that keeping the current way to scane_cost id the best option for now > I sent a series that drops this patch for the moment as well as the SIS_PROP for selecting a core. -- Mel Gorman SUSE Labs