[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110518182605.GC25881@elte.hu>
Date: Wed, 18 May 2011 20:26:05 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Nikhil Rao <ncrao@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Mike Galbraith <efault@....de>, linux-kernel@...r.kernel.org,
"Nikunj A. Dadhania" <nikunj@...ux.vnet.ibm.com>,
Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>,
Stephan Barwolf <stephan.baerwolf@...ilmenau.de>
Subject: Re: [PATCH v2 3/3] sched: increase SCHED_LOAD_SCALE resolution
* Nikhil Rao <ncrao@...gle.com> wrote:
> /*
> - * Increase resolution of nice-level calculations:
> + * Increase resolution of nice-level calculations for 64-bit architectures.
> */
> -#define SCHED_LOAD_SHIFT 10
> +#if BITS_PER_LONG > 32
> +#define SCHED_LOAD_RESOLUTION 10
> +#define scale_load(w) (w << SCHED_LOAD_RESOLUTION)
> +#define scale_load_down(w) (w >> SCHED_LOAD_RESOLUTION)
> +#else
> +#define SCHED_LOAD_RESOLUTION 0
> +#define scale_load(w) w
> +#define scale_load_down(w) w
> +#endif
Please also be a bit more verbose in the comment above why we treat 64-bit
architectures differently - it's not obvious.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists