Re: [PATCH v6 6/7] sched: add SD_BALANCE_NEWIDLE at MC and CPU level for sched_mc>0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, December 17, 2008 - 6:42 pm

On Wed, 17 Dec 2008 22:57:38 +0530
Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com> wrote:


What's with all the crappy macros in here?


This one purports to be a constant, but it isn't - it's code.

It would be cleaner, clearer and more idiomatic to do

static inline int powersaving_sd_flags(void)
{
	...
}

Also, doing (sched_mc_power_savings | sched_smt_power_saving) might
save a branch.


buggy when passed an expression with side-effects.  Doesn't need to be
implemented as a macro.


Sigh.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v6 6/7] sched: add SD_BALANCE_NEWIDLE at MC and CPU ..., Vaidyanathan Srinivasan, (Wed Dec 17, 10:27 am)
Re: [PATCH v6 6/7] sched: add SD_BALANCE_NEWIDLE at MC and ..., Andrew Morton, (Wed Dec 17, 6:42 pm)
Re: [PATCH v6 6/7] sched: add SD_BALANCE_NEWIDLE at MC and ..., Vaidyanathan Srinivasan, (Thu Dec 18, 2:35 am)
Re: [PATCH v6 6/7] sched: add SD_BALANCE_NEWIDLE at MC and ..., Vaidyanathan Srinivasan, (Thu Dec 18, 8:22 am)