Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-09-03 Thread Joel Fernandes
On Tue, Sep 3, 2019 at 4:53 AM Michal Koutný wrote: > > On Mon, Sep 02, 2019 at 04:02:57PM -0700, Suren Baghdasaryan > wrote: > > > +static inline void cpu_uclamp_print(struct seq_file *sf, > > > + enum uclamp_id clamp_id) > > > [...] > > > + rcu_read_lock

Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-09-03 Thread Michal Koutný
On Mon, Sep 02, 2019 at 04:02:57PM -0700, Suren Baghdasaryan wrote: > > +static inline void cpu_uclamp_print(struct seq_file *sf, > > + enum uclamp_id clamp_id) > > [...] > > + rcu_read_lock(); > > + tg = css_tg(seq_css(sf)); > > + util_clamp =

Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-09-02 Thread Suren Baghdasaryan
Hi Patrick, On Thu, Aug 22, 2019 at 6:28 AM Patrick Bellasi wrote: > > The cgroup CPU bandwidth controller allows to assign a specified > (maximum) bandwidth to the tasks of a group. However this bandwidth is > defined and enforced only on a temporal base, without considering the > actual frequen

Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-09-02 Thread Peter Zijlstra
On Mon, Sep 02, 2019 at 07:38:53AM +0100, Patrick Bellasi wrote: > > On Fri, Aug 30, 2019 at 09:45:05 +, Peter Zijlstra wrote... > > > On Thu, Aug 22, 2019 at 02:28:06PM +0100, Patrick Bellasi wrote: > >> +#define _POW10(exp) ((unsigned int)1e##exp) > >> +#define POW10(exp) _POW10(exp) > > >

Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-09-01 Thread Patrick Bellasi
On Fri, Aug 30, 2019 at 09:45:05 +, Peter Zijlstra wrote... > On Thu, Aug 22, 2019 at 02:28:06PM +0100, Patrick Bellasi wrote: >> +#define _POW10(exp) ((unsigned int)1e##exp) >> +#define POW10(exp) _POW10(exp) > > What is this magic? You're forcing a float literal into an integer. > Surely t

Re: [PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-08-30 Thread Peter Zijlstra
On Thu, Aug 22, 2019 at 02:28:06PM +0100, Patrick Bellasi wrote: > +#define _POW10(exp) ((unsigned int)1e##exp) > +#define POW10(exp) _POW10(exp) What is this magic? You're forcing a float literal into an integer. Surely that deserves a comment! > +struct uclamp_request { > +#define UCLAMP_PERCEN

[PATCH v14 1/6] sched/core: uclamp: Extend CPU's cgroup controller

2019-08-22 Thread Patrick Bellasi
The cgroup CPU bandwidth controller allows to assign a specified (maximum) bandwidth to the tasks of a group. However this bandwidth is defined and enforced only on a temporal base, without considering the actual frequency a CPU is running on. Thus, the amount of computation completed by a task wit