Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp985769pxb; Fri, 15 Apr 2022 17:27:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwobabDOt/jmzM2WUICU0IVgj4WphMtUbBIs0AIGfxgb6J5ieLns/5OtGc8YTck8wKE6wyt X-Received: by 2002:a05:6a00:1341:b0:4fb:3292:bc82 with SMTP id k1-20020a056a00134100b004fb3292bc82mr1314591pfu.45.1650068854967; Fri, 15 Apr 2022 17:27:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650068854; cv=none; d=google.com; s=arc-20160816; b=cbGeUTXe0z2BNYMJ313pys5TFdpYEweqwgDwkMmvGcDt7pDSq/JG6bRv0xCIDBDQsj f7AN//V4siet6pMRj6GBwkYbR/8LGI/AEG2yU3MLadFcv9UxZ+60hoCIAymUc+dMcmOy Ggjkw1M3E5NwX0Qp3GlzVUn6NQ6cAnYff/tt0/HG3w4srHCKNp7ZI+1q/g9e99P/3vXU EnKP38dKZC1VeDkbV6kdF8pm+QwzoVk7eXjgnKEgJtCCUda/qsRnbPk40bNOI4Vl3NgM QnI+vdUnZphL+YuVYv8+qGA1J+jX9uzl5eDvyYRRU6ri+3qfO2XLfYmE9sSlpj67lXfc fsTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/wBcBHH/PMOFRThjI2yLsI4iV/L47XDeFwcTZ0pAL0k=; b=ViGFv8wfNcDB7sQsLAKF/5SYtIcnuJjx67syLjrJSwr4J8BNS6a1hIxkZHrL8GaycU 5movjpMev/teSPixhcq/PCjtFBy70KRl8ZKGRjMpVaY3g7qit2FhjBLyezGnFId8mvzg Hx7tsdPJRjuUUHaRZBSBHygD7Rg9+1eg39JPeMbC+6IAqgYIWPvLyUcs+WLLo3B4uTzX w/rtUvTbXnVpipdTzicE/Wyv2bcat4cQU106O3iY12FA72i+fn8nz4nss2ULnAEOSkSb kjNUgFQK7wP7dDuP0vK78LPw65XWKGYMfn79CE3nHAO2XS/+zhdw4y3tFNiUjNpV40KC ZEkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ra5p3Yxn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i3-20020a632203000000b00399322e8862si2824246pgi.380.2022.04.15.17.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 17:27:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ra5p3Yxn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2F213D7928; Fri, 15 Apr 2022 17:25:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350928AbiDOHSm (ORCPT + 99 others); Fri, 15 Apr 2022 03:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241498AbiDOHSl (ORCPT ); Fri, 15 Apr 2022 03:18:41 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8660AAB4F for ; Fri, 15 Apr 2022 00:16:09 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id j2so13355167ybu.0 for ; Fri, 15 Apr 2022 00:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/wBcBHH/PMOFRThjI2yLsI4iV/L47XDeFwcTZ0pAL0k=; b=Ra5p3YxnUVyMIhwZz2xlFuEK6kV73zqhCP5qmtZkwQ1Nr4ou3o2JTvKHMPbW+E9FGg sv72IATx+hkDEATb4zF1ZrFX4gr41qtXPRuSf4L6tNfDOT6YpSff8GCMlxaHAFVQHcQd 6Isj0+GTvPqPTrb9Frh5ROyBNYafLtTmsgJRSH4D1zzkYduZEJRAUGjm7GXrAQz3KagI LSV6XeN2v7KvFZRQPsKHHLitQ04zpfcHgOh8Kjjn7CP58cbTg/tiuPJksvjatdsShd47 PFAmA1Y+qY4RIXsHoF62q5xhd9prZHA3/Oc/UADh9kR7yiVo3d3T+VWb84aIfafLX2AC S/kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/wBcBHH/PMOFRThjI2yLsI4iV/L47XDeFwcTZ0pAL0k=; b=Fscbzufjr9dVjSWqBEv2jJcstmzPS5wm1cLPbiKW1B+ip5qM6y2xrXED1HwLtqV8Hd JvluOWSbx/SEJ5JGpqKqqTzNMkdzpYxttS/z8DmtAkzLy3VzWXQWtKC5FL5vExZytjB+ 8dCAAY0lrkwKMPZQYYe89XTjeQvipdl9127BYqDx8vtdBtrPOvb7mgmptfSP3wq9rW22 Hd3vx/3czjx1EwmbFEW1Zruzzlde7u3eXL1x99GZshCDX6VJBjB8z/PRUw+V02m2hqaz lWRekzuVwN3oUh/si4Yv8MylOitR9xFJCKAVRip+2ZPznzbHR+BfnUG8tdK5NsVV1yRL MjwQ== X-Gm-Message-State: AOAM531KDWbVG9fv8k1/6KLc5snGuAQOh12TvvtROmiPjExq1tmdzQ82 tmmmj/pGnR2mF1/jnAhgztdYj6npWCS3JUSpBqQ6lw== X-Received: by 2002:a25:ad98:0:b0:641:ce37:e254 with SMTP id z24-20020a25ad98000000b00641ce37e254mr4462001ybi.241.1650006968504; Fri, 15 Apr 2022 00:16:08 -0700 (PDT) MIME-Version: 1.0 References: <030aacb0c1304e43ab917924dcf4f138@AcuMS.aculab.com> <20220411233447.rcencjivkhyltyxm@airbuntu> <4ca5cd70904d47bea0df93f7c0979c66@AcuMS.aculab.com> <20220413235719.xs72pm2kgihia46g@airbuntu> <2956e0e1bbfe4309a749ebb3c8736799@AcuMS.aculab.com> <5fc162f60ba84ab3a61992084d76c726@AcuMS.aculab.com> In-Reply-To: <5fc162f60ba84ab3a61992084d76c726@AcuMS.aculab.com> From: Vincent Guittot Date: Fri, 15 Apr 2022 09:15:57 +0200 Message-ID: Subject: Re: Scheduling tasks on idle cpu To: David Laight Cc: Qais Yousef , 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, 14 Apr 2022 at 16:14, David Laight wrote: > > From: Vincent Guittot > > Sent: 14 April 2022 11:17 > ... > > > > David can rerun is use case after disabling sched_feat(SIS_PROP) > > > > > > How would I do that? > > > > echo NO_SIS_PROP > /sys/kernel/debug/sched/features > > That may not be in the kernel I'm using. > > # cat /sys/kernel/debug/sched_features > GENTLE_FAIR_SLEEPERS START_DEBIT NO_NEXT_BUDDY LAST_BUDDY CACHE_HOT_BUDDY WAKEUP_PREEMPTION ARCH_POWER NO_HRTICK NO_DOUBLE_TICK LB_BIAS NONTASK_POWER TTWU_QUEUE RT_RUNTIME_SHARE NO_LB_MIN NUMA NUMA_FAVOUR_HIGHER NO_NUMA_RESIST_LOWER SIS_PROP has been normally added in v4.13 so I wonder which kernel version you are using Before SIS_PROP, the policy was either to loop all cpu or none depending of avg_idle and avg_cost > > I've been looking at another ftrace output. > The scheduler does like migrating the process to the current cpu. > I have seen it migrate from one idle cpu to another idle cpu. > I've not seen it migrate from an idle cpu to the current cpu. > (But I've not looked hard.) > > These are all the migrates: > TiNG task:12-1005 [026] d... 1111081.796560: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=11 dest_cpu=16 > TiNG task:31-1026 [005] d... 1111081.836556: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=16 dest_cpu=11 > TiNG task:28-1023 [033] d... 1111081.856589: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=11 dest_cpu=33 > TiNG task:11-1004 [013] d... 1111081.856606: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=33 dest_cpu=13 > TiNG task:19-1012 [002] d... 1111081.896564: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=13 dest_cpu=10 > TiNG task:26-1019 [008] d... 1111081.956551: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=10 dest_cpu=18 > TiNG task:34-1029 [001] d... 1111082.016527: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=18 dest_cpu=1 > TiNG task:20-1013 [021] d... 1111082.016589: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=1 dest_cpu=21 > TiNG task:32-1027 [000] d... 1111082.036455: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=21 dest_cpu=2 > TiNG task:15-1008 [006] d... 1111082.056539: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=2 dest_cpu=14 > TiNG task:34-1029 [001] d... 1111082.076536: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=14 dest_cpu=1 > TiNG task:21-1014 [004] d... 1111082.076589: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=1 dest_cpu=4 > TiNG task:11-1004 [013] d... 1111082.096526: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=4 dest_cpu=13 > TiNG task:28-1023 [033] d... 1111082.096584: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=13 dest_cpu=33 > TiNG task:25-1018 [029] d... 1111082.116549: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=33 dest_cpu=11 > TiNG task:27-1020 [032] d... 1111082.176519: sched_migrate_task: comm=RTP sockets pid=990 prio=120 orig_cpu=11 dest_cpu=16 > There are a couple of places where there 2 wakeups before the schedule. > The scheduler definitely doesn't like waking up a process on an even cpu from on odd one. odd and even cpus don't belong to the same llc and we only migrate in the llc at wakeup > But there are also the 13->33 and 1->21 ones. > > David > > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK > Registration No: 1397386 (Wales)