Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1405257 > unrolled thread
| Started by | Morten Rasmussen <morten.rasmussen@arm.com> |
|---|---|
| First post | 2016-05-23 13:10 +0200 |
| Last post | 2016-05-25 11:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 07/16] sched: Make SD_BALANCE_WAKE a topology flag Morten Rasmussen <morten.rasmussen@arm.com> - 2016-05-23 13:10 +0200
Re: [PATCH 07/16] sched: Make SD_BALANCE_WAKE a topology flag Yuyang Du <yuyang.du@intel.com> - 2016-05-25 10:00 +0200
Re: [PATCH 07/16] sched: Make SD_BALANCE_WAKE a topology flag Morten Rasmussen <morten.rasmussen@arm.com> - 2016-05-25 11:30 +0200
| From | Morten Rasmussen <morten.rasmussen@arm.com> |
|---|---|
| Date | 2016-05-23 13:10 +0200 |
| Subject | [PATCH 07/16] sched: Make SD_BALANCE_WAKE a topology flag |
| Message-ID | <rBVUe-53H-15@gated-at.bofh.it> |
For systems with the SD_ASYM_CPUCAPACITY flag set on higher level in the sched_domain hierarchy we need a way to enable wake-up balancing for the lower levels as well as we may want to balance tasks that don't fit the capacity of the previous cpu. We have the option of introducing a new topology flag to express this requirement, or let the existing SD_BALANCE_WAKE flag be set by the architecture as a topology flag. The former means introducing yet another flag, the latter breaks the current meaning of topology flags. None of the options are really desirable. cc: Ingo Molnar <mingo@redhat.com> cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com> --- kernel/sched/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 558ec4a..8014b4a 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5658,6 +5658,7 @@ static int sd_degenerate(struct sched_domain *sd) SD_BALANCE_NEWIDLE | SD_BALANCE_FORK | SD_BALANCE_EXEC | + SD_BALANCE_WAKE | SD_SHARE_CPUCAPACITY | SD_ASYM_CPUCAPACITY | SD_SHARE_PKG_RESOURCES | @@ -5690,6 +5691,7 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent) SD_BALANCE_NEWIDLE | SD_BALANCE_FORK | SD_BALANCE_EXEC | + SD_BALANCE_WAKE | SD_ASYM_CPUCAPACITY | SD_SHARE_CPUCAPACITY | SD_SHARE_PKG_RESOURCES | @@ -6308,6 +6310,7 @@ static int sched_domains_curr_level; * Odd ones out: * SD_ASYM_PACKING - describes SMT quirks * SD_ASYM_CPUCAPACITY - describes mixed capacity topologies + * SD_BALANCE_WAKE - controls wake-up balancing (expensive) */ #define TOPOLOGY_SD_FLAGS \ (SD_SHARE_CPUCAPACITY | \ @@ -6315,6 +6318,7 @@ static int sched_domains_curr_level; SD_NUMA | \ SD_ASYM_PACKING | \ SD_ASYM_CPUCAPACITY | \ + SD_BALANCE_WAKE | \ SD_SHARE_POWERDOMAIN) static struct sched_domain * -- 1.9.1
[toc] | [next] | [standalone]
| From | Yuyang Du <yuyang.du@intel.com> |
|---|---|
| Date | 2016-05-25 10:00 +0200 |
| Message-ID | <rCBTx-6Kw-9@gated-at.bofh.it> |
| In reply to | #1405257 |
On Mon, May 23, 2016 at 11:58:49AM +0100, Morten Rasmussen wrote: > For systems with the SD_ASYM_CPUCAPACITY flag set on higher level in the > sched_domain hierarchy we need a way to enable wake-up balancing for the > lower levels as well as we may want to balance tasks that don't fit the > capacity of the previous cpu. > > We have the option of introducing a new topology flag to express this > requirement, or let the existing SD_BALANCE_WAKE flag be set by the > architecture as a topology flag. The former means introducing yet > another flag, the latter breaks the current meaning of topology flags. > None of the options are really desirable. I'd propose to replace SD_WAKE_AFFINE with SD_BALANCE_WAKE. And the SD_WAKE_AFFINE semantic is simply "waker allowed": waker_allowed = cpumask_test_cpu(cpu, tsk_cpus_allowed(p)); This can be implemented without current functionality change. From there, the choice between waker and wakee, and fast path select_idle_sibling() and the rest slow path should be reworked, which I am thinking about.
[toc] | [prev] | [next] | [standalone]
| From | Morten Rasmussen <morten.rasmussen@arm.com> |
|---|---|
| Date | 2016-05-25 11:30 +0200 |
| Message-ID | <rCDix-7HT-1@gated-at.bofh.it> |
| In reply to | #1406710 |
On Wed, May 25, 2016 at 07:52:49AM +0800, Yuyang Du wrote: > On Mon, May 23, 2016 at 11:58:49AM +0100, Morten Rasmussen wrote: > > For systems with the SD_ASYM_CPUCAPACITY flag set on higher level in the > > sched_domain hierarchy we need a way to enable wake-up balancing for the > > lower levels as well as we may want to balance tasks that don't fit the > > capacity of the previous cpu. > > > > We have the option of introducing a new topology flag to express this > > requirement, or let the existing SD_BALANCE_WAKE flag be set by the > > architecture as a topology flag. The former means introducing yet > > another flag, the latter breaks the current meaning of topology flags. > > None of the options are really desirable. > > I'd propose to replace SD_WAKE_AFFINE with SD_BALANCE_WAKE. And the > SD_WAKE_AFFINE semantic is simply "waker allowed": > > waker_allowed = cpumask_test_cpu(cpu, tsk_cpus_allowed(p)); > > This can be implemented without current functionality change. > > From there, the choice between waker and wakee, and fast path > select_idle_sibling() and the rest slow path should be reworked, which > I am thinking about. I don't really understand how that would work. If you change the semantics of the flags you don't preserve current behaviour. To me it sounds like at total rewrite of everything. SD_BALANCE_WAKE controls whether we go slow path or not in case want_affine is false. SD_WAKE_AFFINE controls whether we should consider waking up near the waker instead of always waking up near the previous cpu.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web