Re: [patch 3/7] Allocpercpu: Do __percpu_disguise() only if CONFIG_DEBUG_VM is set

Eric Dumazet
2007-11-01T07:26:24Z

Christoph Lameter a écrit :
> Disguising costs a few cycles in the hot paths. So switch it off if
> we are not debuggin.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> ---
> include/linux/percpu.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> Index: linux-2.6/include/linux/percpu.h
> ===================================================================
> --- linux-2.6.orig/include/linux/percpu.h 2007-10-31 16:40:14.892121256 -0700
> +++ linux-2.6/include/linux/percpu.h 2007-10-31 16:41:00.907621059 -0700
> @@ -33,7 +33,11 @@
>
> #ifdef CONFIG_SMP
>
> +#ifdef CONFIG_DEBUG_VM
> #define __percpu_disguise(pdata) ((void *)~(unsigned long)(pdata))
> +#else
> +#define __percpu_disguide(pdata) ((void *)(pdata))
> +#endif

Yes good idea, but a litle typo here :)