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=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 C7B23C4363A for ; Fri, 23 Oct 2020 16:52:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 872FB20857 for ; Fri, 23 Oct 2020 16:52:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S460886AbgJWQws (ORCPT ); Fri, 23 Oct 2020 12:52:48 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:10189 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S375002AbgJWQws (ORCPT ); Fri, 23 Oct 2020 12:52:48 -0400 X-IronPort-AV: E=Sophos;i="5.77,409,1596492000"; d="scan'208";a="362621182" Received: from 173.121.68.85.rev.sfr.net (HELO hadrien) ([85.68.121.173]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2020 18:52:45 +0200 Date: Fri, 23 Oct 2020 18:52:45 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Chen Yu cc: Julia Lawall , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Linux Kernel Mailing List Subject: Re: [PATCH v2] sched/fair: check for idle core In-Reply-To: Message-ID: References: <1603372550-14680-1-git-send-email-Julia.Lawall@inria.fr> 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 Sat, 24 Oct 2020, Chen Yu wrote: > On Fri, Oct 23, 2020 at 1:32 AM Julia Lawall wrote: > > > [cut] > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index aa4c6227cd6d..9b23dad883ee 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -5804,6 +5804,9 @@ wake_affine_idle(int this_cpu, int prev_cpu, int sync) > > if (sync && cpu_rq(this_cpu)->nr_running == 1) > > return this_cpu; > > > > + if (available_idle_cpu(prev_cpu)) > How about also taking sched_idle_cpu(prev_cpu) into consideration? > if (available_idle_cpu(prev_cpu) || sched_idle_cpu(prev_cpu)) I have no opinion about this, because it wasn't relevant to the application I was looking at. The available_idle check on prev previously in wake_affine_idle doesn't check sched_idle_cpu, so I didn't put it here. julia