[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160120184414.GQ6357@twins.programming.kicks-ass.net>
Date: Wed, 20 Jan 2016 19:44:14 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Nicolas Pitre <nicolas.pitre@...aro.org>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>, tglx@...utronix.de,
rafael@...nel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, vincent.guittot@...aro.org
Subject: Re: [RFC V2 2/2] sched: idle: IRQ based next prediction for idle
period
On Wed, Jan 20, 2016 at 12:46:48PM -0500, Nicolas Pitre wrote:
> > +struct stats {
> > + u64 sum; /* sum of values */
> > + u32 values[STATS_NR_VALUES]; /* array of values */
> > + unsigned char w_ptr; /* current window pointer */
>
> Why did you change this from an unsigned int?
>
> This won't provide any memory space saving given that the structure has
> to be padded up to the next 64-bit boundary.
Not to mention that loading bytes is more expensive on many archs
compared to full words.
Also, its not a pointer, its an index.
So: unsigned int w_idx;
Powered by blists - more mailing lists