From: Mel Gorman <firstname.lastname@example.org> To: "Song Bao Hua (Barry Song)" <email@example.com> Cc: LKML <firstname.lastname@example.org>, Ingo Molnar <email@example.com>, Peter Zijlstra <firstname.lastname@example.org>, Vincent Guittot <email@example.com>, Valentin Schneider <firstname.lastname@example.org>, Aubrey Li <email@example.com>, yangyicong <firstname.lastname@example.org> Subject: Re: [PATCH 8/9] sched/fair: select idle cpu from idle cpumask for task wakeup Date: Wed, 4 Aug 2021 11:26:13 +0100 [thread overview] Message-ID: <20210804102613.GC6464@techsingularity.net> (raw) In-Reply-To: <email@example.com> On Mon, Aug 02, 2021 at 10:41:13AM +0000, Song Bao Hua (Barry Song) wrote: > Hi Mel, Aubrey, > A similar thing Yicong and me has discussed is having a mask or a count for > idle cores. And then we can only scan idle cores in this mask in > select_idle_cpu(). > Either approach would require a lot of updates. > A obvious problem is that has_idle_cores is a bool, it can seriously lag > from the real status. I mean, after system enters the status without idle > cores, has_idle_cores could be still true. > True. > Right now, we are setting has_idle_cores to true while cpu enters idle > and its smt sibling is also idle. But we are setting has_idle_cores to > false only after we scan all cores in a llc. > > So we have thought for a while to provide an idle core mask. But never > really made a workable patch. > > Mel's patch7/9 limits the number of cores which will be scanned in > select_idle_cpu(), it might somehow alleviate the problem we redundantly > scan all cores while we actually have no idle core even has_idle_cores > is true. > I prototyped a patch that tracked the location of a known idle core and use it as a starting hint for a search. It's cleared if the core is selected for use. Unfortunately, it was not a universal win so was dropped for the moment but either way, improving the accurate of has_idle_cores without being too expensive would be niuce. > However, if we can get idle core mask, it could be also good to > select_idle_core()? Maybe after that, we don't have to enforce > proportional scan limits while scanning for an idle core? > To remove the limits entirely, it would have to be very accurate and it's hard to see how that can be done without having a heavily updated shared cache line. -- Mel Gorman SUSE Labs
next prev parent reply other threads:[~2021-08-04 10:26 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-26 10:22 [RFC PATCH 0/9] Modify and/or delete SIS_PROP Mel Gorman 2021-07-26 10:22 ` [PATCH 1/9] sched/fair: Track efficiency of select_idle_sibling Mel Gorman 2021-07-26 10:22 ` [PATCH 2/9] sched/fair: Track efficiency of task recent_used_cpu Mel Gorman 2021-07-26 10:22 ` [PATCH 3/9] sched/fair: Track efficiency of select_idle_core Mel Gorman 2021-07-26 10:22 ` [PATCH 4/9] sched/fair: Use prev instead of new target as recent_used_cpu Mel Gorman 2021-07-26 10:22 ` [PATCH 5/9] sched/fair: Avoid a second scan of target in select_idle_cpu Mel Gorman 2021-07-26 10:22 ` [PATCH 6/9] sched/fair: Make select_idle_cpu() proportional to cores Mel Gorman 2021-07-26 10:22 ` [PATCH 7/9] sched/fair: Enforce proportional scan limits when scanning for an idle core Mel Gorman 2021-08-02 10:52 ` Song Bao Hua (Barry Song) 2021-08-04 10:22 ` Mel Gorman 2021-07-26 10:22 ` [PATCH 8/9] sched/fair: select idle cpu from idle cpumask for task wakeup Mel Gorman 2021-08-02 10:41 ` Song Bao Hua (Barry Song) 2021-08-04 10:26 ` Mel Gorman [this message] 2021-08-05 0:23 ` Aubrey Li 2021-09-17 3:44 ` Barry Song 2021-09-17 4:15 ` Barry Song 2021-09-17 9:11 ` Aubrey Li 2021-09-17 13:35 ` Mel Gorman 2021-07-26 10:22 ` [PATCH 9/9] sched/core: Delete SIS_PROP and rely on the idle cpu mask Mel Gorman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210804102613.GC6464@techsingularity.net \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [PATCH 8/9] sched/fair: select idle cpu from idle cpumask for task wakeup' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).