Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp25714pxb; Mon, 11 Apr 2022 17:48:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUR4F90moTs7Q/CjshHVvgfE7Ji4hSztGcQcT/KNgMFhyzAg8+51owUu3GZztTFNn04UVu X-Received: by 2002:a05:6402:510c:b0:419:3fe5:15f with SMTP id m12-20020a056402510c00b004193fe5015fmr36728516edd.274.1649724530101; Mon, 11 Apr 2022 17:48:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649724530; cv=none; d=google.com; s=arc-20160816; b=Hv8bip0ltQ9wscgrcSwZBxGHI1YGz4goiqbVQ2vEqnQjVTZR3grHGBMjdajqH84XTd kyc+bdtiuk3OKhdVtf4zU9CWTR9WfjxuboZXrRCwWcYV4S+b+dgKJ0Q32YBJlxxLSBnV ZejTAugpa4jkXWdBhZmsyDzaRD4B+ES0yNc6yLuHz+snjjxmDZFRYPYGggJOrRXNh7I5 DDrVwIR6WH97dDu6AskX3CZ9lOWIj8oLwVPHdfXE9miY/NnoOkAXKhL6+ZaBJffUTnQ4 Kl96qL4eLd6+f9FymqqJhNkkI4vuENaS8no6/HE0U9Dn3fuW5oNhR/hbbKJdmNQmz91m F5fw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=yb74bPZAPgVhn7zNAOeCyXUTJ2xNgMc0CrK+iGXAZdQ=; b=y9ckfWzuxleqqYWzbq1lW7qbBh4Y5H7fFPUelG5LwyjdzklpeoOXvWvgZCSzFG+shV 6ogIaisb50K4axT6ws0+w5ZtSxEUHknRQyNtSVavThseRjmyjOyX5AncYq4zcYYXmm3x DWYzIu/CBqYGsZAiplEJRtO5wyJWwoZyJx9x/3WiLhryPMzqbIfE1tcvDQ66hvIVtOFm 7qrCTlfe4uywmbPegUEU2wCAqWpyC2UUAKHbgdxjPztI1bBOOTPFBIBbsEAC/N68S48p iOPkpgjGLMAM1SenATQUoLAYuEKaRaIOnv/KMn8qmPrWArKHrvxsdqCJUBLUn39XBDxR G5uQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne17-20020a1709077b9100b006e7ec2be6bbsi12089119ejc.411.2022.04.11.17.48.25; Mon, 11 Apr 2022 17:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344388AbiDKJ3G (ORCPT + 99 others); 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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.