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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no 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 0D58DC388F9 for ; Wed, 21 Oct 2020 15:08:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7F0E2224E for ; Wed, 21 Oct 2020 15:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2444017AbgJUPIF (ORCPT ); Wed, 21 Oct 2020 11:08:05 -0400 Received: from mx2.suse.de ([195.135.220.15]:60060 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2442688AbgJUPIF (ORCPT ); Wed, 21 Oct 2020 11:08:05 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 68777AD03; Wed, 21 Oct 2020 15:08:03 +0000 (UTC) Date: Wed, 21 Oct 2020 16:08:00 +0100 From: Mel Gorman To: Julia Lawall Cc: Vincent Guittot , Ingo Molnar , kernel-janitors@vger.kernel.org, Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Valentin Schneider , Gilles Muller Subject: Re: [PATCH] sched/fair: check for idle core Message-ID: <20201021150800.GG32041@suse.de> References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <20201021112038.GC32041@suse.de> <20201021122532.GA30733@vingu-book> <20201021124700.GE32041@suse.de> <20201021131827.GF32041@suse.de> 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 Wed, Oct 21, 2020 at 03:24:48PM +0200, Julia Lawall wrote: > > I worry it's overkill because prev is always used if it is idle even > > if it is on a node remote to the waker. It cuts off the option of a > > wakee moving to a CPU local to the waker which is not equivalent to the > > original behaviour. > > But it is equal to the original behavior in the idle prev case if you go > back to the runnable load average days... > It is similar but it misses the sync treatment and sd->imbalance_pct part of wake_affine_weight which has unpredictable consequences. The data available is only on the fully utilised case. > The problem seems impossible to solve, because there is no way to know by > looking only at prev and this whether the thread would prefer to stay > where it was or go to the waker. > Yes, this is definitely true. Looking at prev_cpu and this_cpu is a crude approximation and the path is heavily limited in terms of how clever it can be. -- Mel Gorman SUSE Labs From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mel Gorman Date: Wed, 21 Oct 2020 15:08:00 +0000 Subject: Re: [PATCH] sched/fair: check for idle core Message-Id: <20201021150800.GG32041@suse.de> List-Id: References: <1603211879-1064-1-git-send-email-Julia.Lawall@inria.fr> <20201021112038.GC32041@suse.de> <20201021122532.GA30733@vingu-book> <20201021124700.GE32041@suse.de> <20201021131827.GF32041@suse.de> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall Cc: Vincent Guittot , Ingo Molnar , kernel-janitors@vger.kernel.org, Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Valentin Schneider , Gilles Muller On Wed, Oct 21, 2020 at 03:24:48PM +0200, Julia Lawall wrote: > > I worry it's overkill because prev is always used if it is idle even > > if it is on a node remote to the waker. It cuts off the option of a > > wakee moving to a CPU local to the waker which is not equivalent to the > > original behaviour. > > But it is equal to the original behavior in the idle prev case if you go > back to the runnable load average days... > It is similar but it misses the sync treatment and sd->imbalance_pct part of wake_affine_weight which has unpredictable consequences. The data available is only on the fully utilised case. > The problem seems impossible to solve, because there is no way to know by > looking only at prev and this whether the thread would prefer to stay > where it was or go to the waker. > Yes, this is definitely true. Looking at prev_cpu and this_cpu is a crude approximation and the path is heavily limited in terms of how clever it can be. -- Mel Gorman SUSE Labs