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 03D87C433F5 for ; Mon, 11 Apr 2022 09:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344391AbiDKJ3G (ORCPT ); Mon, 11 Apr 2022 05:29:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232383AbiDKJ3D (ORCPT ); Mon, 11 Apr 2022 05:29:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC8683299F for ; Mon, 11 Apr 2022 02:26:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9AD29B8118D for ; Mon, 11 Apr 2022 09:26:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C8C04C385A4; Mon, 11 Apr 2022 09:26:42 +0000 (UTC) Date: Mon, 11 Apr 2022 05:26:41 -0400 From: Steven Rostedt To: David Laight Cc: 'Qais Yousef' , Vincent Guittot , Dietmar Eggemann , "mingo@redhat.com" , "peterz@infradead.org" , "juri.lelli@redhat.com" , "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: <20220411052641.5370437f@rorschach.local.home> In-Reply-To: <030aacb0c1304e43ab917924dcf4f138@AcuMS.aculab.com> References: <030aacb0c1304e43ab917924dcf4f138@AcuMS.aculab.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 11 Apr 2022 08:26:33 +0000 David Laight wrote: > Does that actually happen? > I've seen the following: > 34533 [017]: sys_futex(uaddr: 1049104, op: 85, val: 1, utime: 1, uaddr2: 1049100, val3: 4000001) > 34533 [017]: sched_migrate_task: pid=34512 prio=120 orig_cpu=14 dest_cpu=17 > 34533 [017]: sched_wakeup: pid=34512 prio=120 success=1 target_cpu=017 > and pid 34512 doesn't get scheduled until pid 34533 finally sleeps. > This is in spite of there being 5 idle cpu. What's the topology? I believe the scheduler will refrain from migrating tasks to idle CPUs that are on other NUMA nodes as much as possible. Were those other 5 idle CPUs on another node? -- Steve > cpu 14 is busy running a RT thread, but migrating to cpu 17 seems wrong. > > This is on a RHEL7 kernel, I've not replicated it on anything recent. > But I've very much like a RT thread to be able to schedule a non-RT > thread to run on an idle cpu.