Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp299556pxb; Tue, 12 Apr 2022 02:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIHDghd1QWaAVVlVhjgCmNU9G0xaI7m8dg810SIu61J1M+41/sz7wKCT9OLBuIb17rls0D X-Received: by 2002:a17:90a:6501:b0:1ca:a7df:695c with SMTP id i1-20020a17090a650100b001caa7df695cmr3965223pjj.152.1649754669957; Tue, 12 Apr 2022 02:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649754669; cv=none; d=google.com; s=arc-20160816; b=FoO1nq0kGMuT8s220de9wpJN30GQ9y4DYmIZ0xEdbbyC7pMLxgnH+q3ZmeX4GmEbIP W98weE+eFkKDKXAyelpWJ1DijiqQmUpoWjxvsKnb0ViRA5rDdayFbs7W3jcPlRE3yOlw m7b5gtxdxmIwYpAMPUnWEUfEIlETEDrzYjMdTgHBTvCn8Amq0amvknTH7DftWFU67PW3 zQLP++M5nfWYj/WPBw6wwft65ZTKzfcUVHhF4kPiPeBUuiLUCuNkABc+4g3Nfx1rVGKH w3t1578k4jdDkW1pGQVORbSG0IQVjQat0j3VUCpHlCBAaGKVFXostXKiAyPC5p0ua8wk K6Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :mime-version:accept-language:in-reply-to:references:message-id:date :thread-index:thread-topic:subject:cc:to:from; bh=NkhUrPOi0mMpOAD2Yy8QfSVlOAMfHgbQ9w5YK6nKR38=; b=fBXOzm75+MxFWUQmZR1QgeIrf1AcAyJ0KaMn5Icb6Za18yCZzxvqC5vSwcvHTfgTdZ Lvy2Tf94Vw8LZ+DCV8JW9Xa3zYGlBBqd7sf7mABPSr8XH7JlnN/RoTcTBkoPG80PYfaI 1PaWTwatEyFxsZ2QX1FPk0gRbCaZWfb/ER06c5ASwnLk9MKdpbBdwFVdKKetkEFN/ACP 1BeyS9LOMvwAz67Tvm+rR0K/LCAFq1KXQ3GuG4Ufs5xA2AqiQBNhVrZx3AQbjnl3L0GS bqrbE58xcc1aSGN+hnplLRR4kKKpRdjjbJKxVyls08WScdmjn0pCyQ/AaWRCpdMVmhKE RB8A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a655347000000b00399460d7fc4si1875684pgr.458.2022.04.12.02.10.56; Tue, 12 Apr 2022 02:11:09 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344949AbiDKKAA convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Apr 2022 06:00:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344944AbiDKJ77 (ORCPT ); Mon, 11 Apr 2022 05:59:59 -0400 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 79D3641621 for ; Mon, 11 Apr 2022 02:57:45 -0700 (PDT) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-60-NdxDbdFkOjqgxG8xxJVvzQ-1; Mon, 11 Apr 2022 10:57:42 +0100 X-MC-Unique: NdxDbdFkOjqgxG8xxJVvzQ-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) by AcuMS.aculab.com (fd9f:af1c:a25b:0:994c:f5c2:35d6:9b65) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Mon, 11 Apr 2022 10:57:39 +0100 Received: from AcuMS.Aculab.com ([fe80::994c:f5c2:35d6:9b65]) by AcuMS.aculab.com ([fe80::994c:f5c2:35d6:9b65%12]) with mapi id 15.00.1497.033; Mon, 11 Apr 2022 10:57:39 +0100 From: David Laight To: 'Steven Rostedt' 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 Thread-Topic: Scheduling tasks on idle cpu Thread-Index: AdhNfEgLjonPVH3ESQeb3O9OCn/HMQAAZaqAAAMHdiA= Date: Mon, 11 Apr 2022 09:57:39 +0000 Message-ID: References: <030aacb0c1304e43ab917924dcf4f138@AcuMS.aculab.com> <20220411052641.5370437f@rorschach.local.home> In-Reply-To: <20220411052641.5370437f@rorschach.local.home> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,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 From: Steven Rostedt > Sent: 11 April 2022 10:27 > > 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? 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. David > > -- 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. - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)