Re: [PATCH] sched/idle: Drop !! while calculating 'broadcast'

2014-06-24 Thread Viresh Kumar
On 24 June 2014 17:48, Mike Galbraith wrote: > x86_64 gcc-4.8.3 made 1 less instruction, a shift. I thought about doing this test for x86 as well, and over-estimated compilers intelligence. I must have done it :) And finally this patch is worth more than I originally estimated :) -- To unsubscri

Re: [PATCH] sched/idle: Drop !! while calculating 'broadcast'

2014-06-24 Thread Mike Galbraith
On Tue, 2014-06-24 at 10:03 +0200, Peter Zijlstra wrote: > On Tue, Jun 24, 2014 at 10:01:01AM +0530, Viresh Kumar wrote: > > We don't need 'broadcast' to be set to 'zero or one', but to 'zero or > > non-zero' > > and so the extra operation to convert it to 'zero or one' can be skipped. > > > > A

Re: [PATCH] sched/idle: Drop !! while calculating 'broadcast'

2014-06-24 Thread Viresh Kumar
On 24 June 2014 13:33, Peter Zijlstra wrote: > All true; but does it change anything? That is, does your compiler > generate better code because of this? Compilers are smart enough now a days and may not perform !! at all I believe.. And so this patch is more about code clarity .. I tried compa

Re: [PATCH] sched/idle: Drop !! while calculating 'broadcast'

2014-06-24 Thread Peter Zijlstra
On Tue, Jun 24, 2014 at 10:01:01AM +0530, Viresh Kumar wrote: > We don't need 'broadcast' to be set to 'zero or one', but to 'zero or > non-zero' > and so the extra operation to convert it to 'zero or one' can be skipped. > > Also change type of 'broadcast' to unsigned int, i.e. type of > drv->st

[PATCH] sched/idle: Drop !! while calculating 'broadcast'

2014-06-23 Thread Viresh Kumar
We don't need 'broadcast' to be set to 'zero or one', but to 'zero or non-zero' and so the extra operation to convert it to 'zero or one' can be skipped. Also change type of 'broadcast' to unsigned int, i.e. type of drv->states[*].flags. Signed-off-by: Viresh Kumar --- Rebased over: 3.16-rc2.