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, URIBL_BLOCKED,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 60692C388F9 for ; Wed, 21 Oct 2020 17:39:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F1D23223BF for ; Wed, 21 Oct 2020 17:39:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2503655AbgJURjH (ORCPT ); Wed, 21 Oct 2020 13:39:07 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:52530 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405345AbgJURjG (ORCPT ); Wed, 21 Oct 2020 13:39:06 -0400 X-IronPort-AV: E=Sophos;i="5.77,401,1596492000"; d="scan'208";a="473731042" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2020 19:39:03 +0200 Date: Wed, 21 Oct 2020 19:39:02 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Mel Gorman cc: Vincent Guittot , Julia Lawall , Ingo Molnar , kernel-janitors@vger.kernel.org, Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Daniel Bristot de Oliveira , linux-kernel , Valentin Schneider , Gilles Muller Subject: Re: [PATCH] sched/fair: check for idle core In-Reply-To: <20201021170050.GI32041@suse.de> Message-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> <20201021150800.GG32041@suse.de> <20201021170050.GI32041@suse.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Oct 2020, Mel Gorman wrote: > On Wed, Oct 21, 2020 at 05:19:53PM +0200, Vincent Guittot wrote: > > On Wed, 21 Oct 2020 at 17:08, Mel Gorman wrote: > > > > > > 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. > > > > In fact It's the same because runnable_load_avg was null when cpu is idle, so > > if prev_cpu was idle, we were selecting prev_idle > > > > Sync wakeups may only consider this_cpu and the load of the waker but > in that case, it was probably selected already by the sync check in > wake_affine_idle which will pass except when the domain is overloaded. > Fair enough, I'll withdraw any concerns. It could have done with a > comment :/ Sure, I'll resend the patch and extend the log message with this issue. Otherwise, I was wondering are there any particular kinds of applications where gathering the threads back with the waker is a good idea? I've been looking more at applications with N threads on N cores, where it would be best for the threads to remain where they are. thanks, julia