Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1234638
| From | Mike Galbraith <umgwanakikbuti@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] sched/fair: Skip wake_affine() for core siblings |
| Date | 2015-09-29 04:10 +0200 |
| Message-ID | <qdSwG-Wh-7@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qdDR0-2VP-17@gated-at.bofh.it> <qdGvw-6My-25@gated-at.bofh.it> <qdIH1-3xT-29@gated-at.bofh.it> <qdLlw-7nn-11@gated-at.bofh.it> <qdM7U-59-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 2015-09-28 at 22:19 +0300, Kirill Tkhai wrote:
> >> Imagine a situation, when we share a mutex
> >> with a task on another NUMA node. When the task is realising the mutex
> >> it is waking us, but we definitelly won't use affine logic in this case.
> >
> > Why not? A wakeup is a wakeup is a wakeup, they all do the same thing.
> > If wake_wide() doesn't NAK an affine wakeup, we ask wake_affine() for
> > its opinion, then look for an idle CPU near the waker's CPU if it says
> > OK, or near wakee's previous CPU if it says go away.
>
> But NUMA sd does not have SD_WAKE_AFFINE flag, so this case a new cpu won't
> be choosen from previous node. There will be choosen the highest domain
> of smp_processor_id(), which has SD_BALANCE_WAKE flag, and the cpu will
> be choosen from the idlest group/cpu. And we don't have a deal with old
> cache at all. This looks like a completely wrong behaviour...
SD_WAKE_AFFINE is enabled globally by default, and SD_BALANCE_WAKE is
disabled globally due to cost and whatnot.
wingenfelder:~/:[0]# tune-sched-domains
{cpu0/domain0:SMT} SD flag: 4783
+ 1: SD_LOAD_BALANCE: Do load balancing on this domain
+ 2: SD_BALANCE_NEWIDLE: Balance when about to become idle
+ 4: SD_BALANCE_EXEC: Balance on exec
+ 8: SD_BALANCE_FORK: Balance on fork, clone
- 16: SD_BALANCE_WAKE: Wake to idle CPU on task wakeup
+ 32: SD_WAKE_AFFINE: Wake task to waking CPU
- 64: [unused]
+ 128: SD_SHARE_CPUCAPACITY: Domain members share cpu power
- 256: SD_SHARE_POWERDOMAIN: Domain members share power domain
+ 512: SD_SHARE_PKG_RESOURCES: Domain members share cpu pkg resources
-1024: SD_SERIALIZE: Only a single load balancing instance
-2048: SD_ASYM_PACKING: Place busy groups earlier in the domain
+4096: SD_PREFER_SIBLING: Prefer to place tasks in a sibling domain
-8192: SD_OVERLAP: sched_domains of this level overlap
-16384: SD_NUMA: cross-node balancing
{cpu0/domain1:MC} SD flag: 4655
+ 1: SD_LOAD_BALANCE: Do load balancing on this domain
+ 2: SD_BALANCE_NEWIDLE: Balance when about to become idle
+ 4: SD_BALANCE_EXEC: Balance on exec
+ 8: SD_BALANCE_FORK: Balance on fork, clone
- 16: SD_BALANCE_WAKE: Wake to idle CPU on task wakeup
+ 32: SD_WAKE_AFFINE: Wake task to waking CPU
- 64: [unused]
- 128: SD_SHARE_CPUCAPACITY: Domain members share cpu power
- 256: SD_SHARE_POWERDOMAIN: Domain members share power domain
+ 512: SD_SHARE_PKG_RESOURCES: Domain members share cpu pkg resources
-1024: SD_SERIALIZE: Only a single load balancing instance
-2048: SD_ASYM_PACKING: Place busy groups earlier in the domain
+4096: SD_PREFER_SIBLING: Prefer to place tasks in a sibling domain
-8192: SD_OVERLAP: sched_domains of this level overlap
-16384: SD_NUMA: cross-node balancing
{cpu0/domain2:NUMA} SD flag: 25647
+ 1: SD_LOAD_BALANCE: Do load balancing on this domain
+ 2: SD_BALANCE_NEWIDLE: Balance when about to become idle
+ 4: SD_BALANCE_EXEC: Balance on exec
+ 8: SD_BALANCE_FORK: Balance on fork, clone
- 16: SD_BALANCE_WAKE: Wake to idle CPU on task wakeup
+ 32: SD_WAKE_AFFINE: Wake task to waking CPU
- 64: [unused]
- 128: SD_SHARE_CPUCAPACITY: Domain members share cpu power
- 256: SD_SHARE_POWERDOMAIN: Domain members share power domain
- 512: SD_SHARE_PKG_RESOURCES: Domain members share cpu pkg resources
+1024: SD_SERIALIZE: Only a single load balancing instance
-2048: SD_ASYM_PACKING: Place busy groups earlier in the domain
-4096: SD_PREFER_SIBLING: Prefer to place tasks in a sibling domain
+8192: SD_OVERLAP: sched_domains of this level overlap
+16384: SD_NUMA: cross-node balancing
-Mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-25 20:00 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-26 17:30 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-28 12:30 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-28 15:20 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-28 17:40 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-28 17:50 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-28 20:30 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-28 21:20 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-29 04:10 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-29 17:00 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-29 18:10 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-29 18:10 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Mike Galbraith <umgwanakikbuti@gmail.com> - 2015-09-29 19:30 +0200
Re: [PATCH] sched/fair: Skip wake_affine() for core siblings Kirill Tkhai <ktkhai@odin.com> - 2015-09-30 21:20 +0200
csiph-web