Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444329
| From | Vincent Guittot <vincent.guittot@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain |
| Date | 2016-07-15 15:40 +0200 |
| Message-ID | <rVbvs-7t6-11@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <rUsRH-3OH-5@gated-at.bofh.it> <rUvmy-5za-21@gated-at.bofh.it> <rUOSe-1Ni-31@gated-at.bofh.it> <rUQAF-2UX-11@gated-at.bofh.it> <rV9MZ-6nQ-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 15 July 2016 at 13:46, Morten Rasmussen <morten.rasmussen@arm.com> wrote: > On Thu, Jul 14, 2016 at 04:15:20PM +0100, Morten Rasmussen wrote: >> On Thu, Jul 14, 2016 at 03:25:36PM +0200, Vincent Guittot wrote: >> > On 13 July 2016 at 18:37, Morten Rasmussen <morten.rasmussen@arm.com> wrote: >> > > Also, for SMT max capacity is less than 1024 already. No? >> > >> > Yes, it is. I haven't looked in details but i think that we could use >> > a capacity of 1024 for SMT with changes that have been done on how to >> > evaluate if a sched_group is overloaded or not. >> >> Changing SMT is a bit more invasive that I had hoped for for this patch >> set. I will see if we can make it work with the current SMT capacities. >> >> > >> > > But we may be able to cater for this in wake_cap() somehow. I can have a >> > > look if Vincent doesn't like this patch. >> > >> > IMO, rd->max_cpu_capacity field doesn't seem to be required for now . >> >> No problem. I will try to get rid of it. I will drop the "arm:" patches >> as well as they would have to be extended to guarantee a max capacity of >> 1024 and we most likely will have to change it again when Juri's DT >> solution hopefully gets merged. > > I have had a closer look at wake_cap() again. Getting rid of > rd->max_cpu_capacity isn't as easy as I thought. > > The fundamental problem is that all we have in wake_cap() is the waking > cpu and previous cpu ids which isn't sufficient to determine whether we > have an asymmetric capacity system or not. A capacity <1024 can either a > little cpu or an SMT thread. We need a third piece of information, which > can be either the highest cpu capacity available in the cpu, or a > flag/variable/function telling us whether we are on an SMT system. > > I see the following solutions to the problem: > > 1. Have a system-wide max_cpu_capacity (as proposed in this patch) which > can let us detect SMT systems as max_cpu_capacity < 1024 implies SMT. > > 2. Change SMT thread capacity to 1024 so we implicitly know that max > capacity is always 1024. As said above, this is a very invasive change > as it would mean that we no longer distinguish between SMP and SMT. > smt_gain and SD_SHARE_CPUCAPACITY would no longer have any effect and > can be ripped out. I would prefer not create a dependency on such a > massive change. We can do the experiment afterwards if needed. > > 3. Detect SMT in wake_cap(). This requires access to the sched_domain > hierarchy as the SD_SHARE_CPUCAPACITY is the only way to detect SMT, > AFAIK, apart from looping through the capacities of all cpus in the > system basically computing max_cpu_capacity each time. > wake_cap() is currently called before rcu_read_lock() that gives us > access to the sched_domain hierarchy. I would have to postpone the > wake_cap() call to being inside the lock and introduce another lookup in > the sched_domain hierarchy which would be executed on every wake-up on > all systems. IMHO, that is a bit ugly. > > I don't really like any of the solutions, but of those three I would go > for the current solution (1) as it is very minimal both in the amount of > code touched/affected and overhead. We can kill it later if we have a > better one, no problem for me. I had solution 2 in mind. I haven't looked deeply the impact but I thought that the main remaining blocking point is in update_numa_stats where it use the fact that the capacity is less than 1024 vat SMT level to compute task_capacity and set has_free_capacity only if we have less than 1 task per core. smt_gain would not be used anymore > > Do you see any alternatives?
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Vincent Guittot <vincent.guittot@linaro.org> - 2016-07-13 14:50 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Dietmar Eggemann <dietmar.eggemann@arm.com> - 2016-07-13 16:00 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-13 18:40 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Vincent Guittot <vincent.guittot@linaro.org> - 2016-07-14 15:30 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-14 17:20 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-15 13:50 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Vincent Guittot <vincent.guittot@linaro.org> - 2016-07-15 15:40 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-15 18:10 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Vincent Guittot <vincent.guittot@linaro.org> - 2016-07-18 14:50 +0200
Re: [PATCH v2 06/13] sched: Store maximum per-cpu capacity in root domain Morten Rasmussen <morten.rasmussen@arm.com> - 2016-07-18 17:20 +0200
csiph-web