Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1622067
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC v3 0/5] Add capacity capping support to the CPU controller |
| Date | 2017-04-12 14:20 +0200 |
| Message-ID | <tvppE-4l7-21@gated-at.bofh.it> (permalink) |
| References | <tfRge-5JN-31@gated-at.bofh.it> <tn6WT-6aK-29@gated-at.bofh.it> <tn9rI-81U-11@gated-at.bofh.it> <tuC5z-68L-3@gated-at.bofh.it> <tv8f8-1JB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Let me reply in parts as I read this.. easy things first :-) On Tue, Apr 11, 2017 at 06:58:33PM +0100, Patrick Bellasi wrote: > On 10-Apr 09:36, Peter Zijlstra wrote: > > 4) they have muddled semantics, because while its presented as a task > > property, it very much is not. > > Actually we always presented it as a task group property, while other > people suggested it should be a per-task API. > > Still, IMO it could make sense also as a per-task API, for example > considering a specific RT task which we know in our system is > perfectly fine to always run it below a certain OPP. > > Do you think it should be a per-task API? > Should we focus (at least initially) on providing a per task-group API? Even for the cgroup interface, I think they should set a per-task property, not a group property. > > 3) they have absolutely unacceptable overhead in implementation. Two > > more RB tree operations per enqueue/dequeue is just not going to > > happen. > > This last point is about "implementation details", I'm pretty > confident that if we find an agreement on the previous point than > this last will be simple to solve. > > Just to be clear, the rb-trees are per CPU and used to track just the > RUNNABLE tasks on each CPUs and, as I described in the previous > example, for the OPP biasing to work I think we really need an > aggregation mechanism. I know its runnable, which is exactly what the regular RB tree in fair already tracks. That gets us 3 RB tree operations per scheduling operation, which is entirely ridiculous. And while I disagree with the need to track this at all, see below, it can be done _much_ cheaper using a double augmented RB-tree, where you keep the min/max as heaps inside the regular RB-tree. > Ideally, every time a task is enqueue/dequeued from a CPU we want to > know what is the currently required capacity clamping. This requires > to maintain an ordered list of values and rb-trees are the most effective > solution. > > Perhaps, if we accept a certain level of approximation, we can > potentially reduce the set of tracked values to a finite set (maybe > corresponding to the EM capacity values) and use just a per-cpu > ref-counting array. > Still the min/max aggregation will have a worst case O(N) search > complexity, where N is the number of finite values we want to use. So the bigger point is that if the min/max is a per-task property (even if set through a cgroup interface), the min(max) / max(min) thing is wrong. If the min/max were to apply to each individual task's util, you'd end up with something like: Dom(\Sum util) = [min(1, \Sum min), min(1, \Sum max)]. Where a possible approximation is scaling the aggregate util into that domain.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-11 20:00 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 14:20 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-12 16:00 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 17:40 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-13 13:40 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 14:20 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-12 15:40 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 16:50 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 14:30 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-12 15:30 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 14:50 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-12 15:30 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 16:40 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-12 16:50 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Peter Zijlstra <peterz@infradead.org> - 2017-04-12 18:20 +0200
Re: [RFC v3 0/5] Add capacity capping support to the CPU controller Patrick Bellasi <patrick.bellasi@arm.com> - 2017-04-13 12:40 +0200
csiph-web