Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

2015-10-09 Thread Yuyang Du
On Tue, Oct 06, 2015 at 04:00:00PM +0800, Yuyang Du wrote: > On Mon, Oct 05, 2015 at 09:04:45AM +0200, Ingo Molnar wrote: > > > > * Yuyang Du wrote: > > > > > +# define SCHED_RESOLUTION_SHIFT 10 > > > > > #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power > > > usage under l

Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

2015-10-06 Thread Yuyang Du
On Mon, Oct 05, 2015 at 09:04:45AM +0200, Ingo Molnar wrote: > > * Yuyang Du wrote: > > > +# define SCHED_RESOLUTION_SHIFT10 > > > #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage > > under light load */ > > Might be worth fixing? Yes, it should be. Peter has a

Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

2015-10-05 Thread Peter Zijlstra
On Mon, Oct 05, 2015 at 01:56:56AM +0800, Yuyang Du wrote: > Metric needs certain resolution to allow detail we can look into, > which also determines the range of the metric. > > For instance, increasing the resolution of [0, 1] (two levels), one > can multiply 1024 and get [0..1024] (1025 levels

Re: [PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

2015-10-05 Thread Ingo Molnar
* Yuyang Du wrote: > +# define SCHED_RESOLUTION_SHIFT 10 > #if 0 /* BITS_PER_LONG > 32 -- currently broken: it increases power usage > under light load */ Might be worth fixing? Also, I noticed this: > -# define SCHED_LOAD_RESOLUTION 10 > +# define SCHED_LOAD_SHIFT(SCHED_RE

[PATCH 1/4] sched/fair: Generalize the load/util averages resolution definition

2015-10-04 Thread Yuyang Du
Metric needs certain resolution to allow detail we can look into, which also determines the range of the metric. For instance, increasing the resolution of [0, 1] (two levels), one can multiply 1024 and get [0..1024] (1025 levels). In sched/fair, a few metrics depend on the resolution: weight, lo