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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63457C433EF for ; Wed, 13 Apr 2022 23:57:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238922AbiDMX74 (ORCPT ); Wed, 13 Apr 2022 19:59:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbiDMX7z (ORCPT ); Wed, 13 Apr 2022 19:59:55 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14AF655497 for ; Wed, 13 Apr 2022 16:57:32 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD9971424; Wed, 13 Apr 2022 16:57:31 -0700 (PDT) Received: from airbuntu (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1ECF93F73B; Wed, 13 Apr 2022 16:57:29 -0700 (PDT) Date: Thu, 14 Apr 2022 00:57:19 +0100 From: Qais Yousef To: Vincent Guittot Cc: David Laight , Dietmar Eggemann , "mingo@redhat.com" , "peterz@infradead.org" , "juri.lelli@redhat.com" , "rostedt@goodmis.org" , "bsegall@google.com" , "mgorman@suse.de" , "linux-kernel@vger.kernel.org" , "parth@linux.ibm.com" , "chris.hyser@oracle.com" , "pkondeti@codeaurora.org" , "Valentin.Schneider@arm.com" , "patrick.bellasi@matbug.net" , "pjt@google.com" , "pavel@ucw.cz" , "tj@kernel.org" , "qperret@google.com" , "tim.c.chen@linux.intel.com" , Wei Wang Subject: Re: Scheduling tasks on idle cpu Message-ID: <20220413235719.xs72pm2kgihia46g@airbuntu> References: <030aacb0c1304e43ab917924dcf4f138@AcuMS.aculab.com> <20220411233447.rcencjivkhyltyxm@airbuntu> <4ca5cd70904d47bea0df93f7c0979c66@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/22 11:07, Vincent Guittot wrote: > On Tue, 12 Apr 2022 at 10:39, David Laight wrote: > > Yes I want the CFS scheduler to pick an idle cpu in preference > > to an active RT one. > > When task 34512 wakes up, scheduler checks if prev or this cpu are > idle which is not the case for you. Then, it compares the load of prev > and this_cpu and seems to select this_cpu (cpu17). > > Once cpu17 selected, it will try to find an idle cpu which shares LLC > but it seems that the scheduler didn't find one and finally keeps task > 34512 on this_cpu. > > Note that during the next tick, a load balance will be trigger if > this_cpu still have both RT and task 34512, David said there are idle cpus " There are two physical cpu with 20 cores each (with hyperthreading). 16, 18, 34, 36 and 38 were idle. So both 16 and 18 should be on the same NUMA node. All the others are running the same RT thread code. " Except for the possibility of them becoming idle just after the task has woken up, shouldn't one of them have been picked? Thanks -- Qais Yousef