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 CEBBBC433DF for ; Mon, 12 Oct 2020 11:18:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CE47208FE for ; Mon, 12 Oct 2020 11:18:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387926AbgJLLSM (ORCPT ); Mon, 12 Oct 2020 07:18:12 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:6908 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387681AbgJLLSL (ORCPT ); Mon, 12 Oct 2020 07:18:11 -0400 X-IronPort-AV: E=Sophos;i="5.77,366,1596492000"; d="scan'208";a="472125793" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 13:18:00 +0200 Date: Mon, 12 Oct 2020 13:18:00 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Vincent Guittot cc: Valentin Schneider , Ingo Molnar , Peter Zijlstra , Juri Lelli , linux-kernel , Gilles Muller Subject: Re: SD_LOAD_BALANCE In-Reply-To: Message-ID: References: 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 Mon, 12 Oct 2020, Vincent Guittot wrote: > On Mon, 12 Oct 2020 at 12:34, Julia Lawall wrote: > > > > > > Would it be useful to always check whether prev is idle, perhaps in > > > > wake_affine_idle or perhaps in select_idle_sibling? > > > > > > Yes, that would make sense to add a condition in wake_affine_idle to > > > return prev if this cpu is not idle (or about to become idle) > > > > The case where this cpu is idle would be in the interrupt case. If both > > prev cpu and this cpu are idle, is it more desirable to move the thread to > > this cpu or to leave it where it was? > > I think that we should keep the current behavior regarding this cpu > and the shared cache case and add one more test before the last return > of the function. > > right now, we select this_cpu: > -if this cpu is idle, it shares cache with prev and previous is not idle. > -if it's a sync wake up because we expect the task to use local data > of the current running task on this cpu. > > Then we add a new case to return prev cpu if it is idle which is your case OK, sounds good, thanks. julia