Repository navigation
Commit 37dc6b5
sched: Remove unnecessary iteration over sched domains to update nr_busy_cpus
nr_busy_cpus parameter is used by nohz_kick_needed() to find out the
number of busy cpus in a sched domain which has SD_SHARE_PKG_RESOURCES
flag set. Therefore instead of updating nr_busy_cpus at every level
of sched domain, since it is irrelevant, we can update this parameter
only at the parent domain of the sd which has this flag set. Introduce
a per-cpu parameter sd_busy which represents this parent domain.
In nohz_kick_needed() we directly query the nr_busy_cpus parameter
associated with the groups of sd_busy.
By associating sd_busy with the highest domain which has
SD_SHARE_PKG_RESOURCES flag set, we cover all lower level domains
which could have this flag set and trigger nohz_idle_balancing if any
of the levels have more than one busy cpu.
sd_busy is irrelevant for asymmetric load balancing. However sd_asym
has been introduced to represent the highest sched domain which has
SD_ASYM_PACKING flag set so that it can be queried directly when
required.
While we are at it, we might as well change the nohz_idle parameter to
be updated at the sd_busy domain level alone and not the base domain
level of a CPU. This will unify the concept of busy cpus at just one
level of sched domain where it is currently used.
Signed-off-by: Preeti U Murthy<preeti@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: svaidy@linux.vnet.ibm.com
Cc: vincent.guittot@linaro.org
Cc: bitbucket@online.de
Cc: benh@kernel.crashing.org
Cc: anton@samba.org
Cc: Morten.Rasmussen@arm.com
Cc: pjt@google.com
Cc: peterz@infradead.org
Cc: mikey@neuling.org
Link: http://lkml.kernel.org/r/20131030031252.23426.4417.stgit@preeti.in.ibm.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>1 parent 2042abe commit 37dc6b5
3 files changed
Lines changed: 28 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4883 | 4883 | | |
4884 | 4884 | | |
4885 | 4885 | | |
| 4886 | + | |
| 4887 | + | |
4886 | 4888 | | |
4887 | 4889 | | |
4888 | 4890 | | |
| |||
4894 | 4896 | | |
4895 | 4897 | | |
4896 | 4898 | | |
| 4899 | + | |
4897 | 4900 | | |
4898 | 4901 | | |
4899 | 4902 | | |
| |||
4902 | 4905 | | |
4903 | 4906 | | |
4904 | 4907 | | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
4905 | 4911 | | |
4906 | 4912 | | |
4907 | 4913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6534 | 6534 | | |
6535 | 6535 | | |
6536 | 6536 | | |
| 6537 | + | |
6537 | 6538 | | |
6538 | 6539 | | |
6539 | | - | |
| 6540 | + | |
6540 | 6541 | | |
6541 | 6542 | | |
6542 | 6543 | | |
6543 | 6544 | | |
6544 | 6545 | | |
6545 | | - | |
6546 | | - | |
| 6546 | + | |
6547 | 6547 | | |
6548 | 6548 | | |
6549 | 6549 | | |
6550 | 6550 | | |
6551 | 6551 | | |
6552 | 6552 | | |
6553 | 6553 | | |
| 6554 | + | |
6554 | 6555 | | |
6555 | 6556 | | |
6556 | | - | |
| 6557 | + | |
6557 | 6558 | | |
6558 | 6559 | | |
6559 | 6560 | | |
6560 | 6561 | | |
6561 | 6562 | | |
6562 | | - | |
6563 | | - | |
| 6563 | + | |
6564 | 6564 | | |
6565 | 6565 | | |
6566 | 6566 | | |
| |||
6767 | 6767 | | |
6768 | 6768 | | |
6769 | 6769 | | |
| 6770 | + | |
| 6771 | + | |
6770 | 6772 | | |
6771 | 6773 | | |
6772 | 6774 | | |
| |||
6792 | 6794 | | |
6793 | 6795 | | |
6794 | 6796 | | |
6795 | | - | |
6796 | | - | |
6797 | | - | |
6798 | | - | |
| 6797 | + | |
6799 | 6798 | | |
6800 | | - | |
6801 | | - | |
| 6799 | + | |
| 6800 | + | |
| 6801 | + | |
6802 | 6802 | | |
6803 | | - | |
6804 | | - | |
6805 | | - | |
| 6803 | + | |
6806 | 6804 | | |
6807 | | - | |
6808 | | - | |
6809 | | - | |
6810 | 6805 | | |
| 6806 | + | |
| 6807 | + | |
| 6808 | + | |
| 6809 | + | |
| 6810 | + | |
| 6811 | + | |
| 6812 | + | |
6811 | 6813 | | |
6812 | 6814 | | |
6813 | 6815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
| 627 | + | |
626 | 628 | | |
627 | 629 | | |
628 | 630 | | |
| |||
0 commit comments