Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1398720
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() |
| Date | 2016-05-11 09:10 +0200 |
| Message-ID | <rxwro-3gT-17@gated-at.bofh.it> (permalink) |
| References | <rwR4S-3QS-9@gated-at.bofh.it> <rwR4S-3QS-7@gated-at.bofh.it> <rxufU-11W-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, May 11, 2016 at 05:05:50AM +0800, Yuyang Du wrote: > On Mon, May 09, 2016 at 12:48:12PM +0200, Peter Zijlstra wrote: > > + i = select_idle_core(p, sd, target); > > + if ((unsigned)i < nr_cpumask_bits) > > + return i; > > + > > + i = select_idle_cpu(p, sd, target); > > + if ((unsigned)i < nr_cpumask_bits) > > + return i; > > + > > + i = select_idle_smt(p, sd, target); > > + if ((unsigned)i < nr_cpumask_bits) > > + return i; > > First, on smt, these three scans have a lot of overlap, Limited, we stop doing the idle_core scan the moment we fail to find one. And on a busy system it is unlikely to come back. Which leaves us with the straight idle_cpu scan. Sure, the one time we fail to find an idle core and fall through we'll scan double, but that should be rare. > Then, I am still considering combining them a bit, like the following patch. > And if you want, more might be combined. I tried that (and you really want the last idle it finds, to minimize the time between testing for idle and returning it), but it didn't matter for anything I could find.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() Peter Zijlstra <peterz@infradead.org> - 2016-05-09 13:00 +0200
Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() Yuyang Du <yuyang.du@intel.com> - 2016-05-11 06:50 +0200
Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() Peter Zijlstra <peterz@infradead.org> - 2016-05-11 09:10 +0200
Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() Yuyang Du <yuyang.du@intel.com> - 2016-05-11 09:30 +0200
Re: [RFC][PATCH 5/7] sched: Rewrite select_idle_siblings() Mike Galbraith <mgalbraith@suse.de> - 2016-05-11 09:50 +0200
csiph-web