lkml.org 
[lkml]   [2005]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Replace zone padding with a definition in cache.h
From
Date
On Tue, 2005-03-15 at 20:12 -0800, Christoph Lameter wrote:
> This patch removes the zone padding hack and establishes definitions
> in include/linux/cache.h to define the padding within struct zone.
>
> Signed-off-by: Christoph Lameter <christoph@lameter.com>
> Signed-off-by: Shai Fultheim <Shai@Scalex86.org>
>
> Index: linux-2.6.11/include/linux/cache.h
> ===================================================================
> --- linux-2.6.11.orig/include/linux/cache.h 2005-03-08 18:40:15.000000000 -0800
> +++ linux-2.6.11/include/linux/cache.h 2005-03-14 10:33:45.247701040 -0800
> @@ -48,4 +48,12 @@
> #endif
> #endif
>
> +#ifndef ____cacheline_pad_in_smp
> +#if defined(CONFIG_SMP)
> +#define ____cacheline_pad_in_smp struct { char x; } ____cacheline_maxaligned_in_smp
^^^^^^^

Doesn't this add a redundant cacheline if the padding is
previously perfect? Because of the extra byte you're adding?

IIRC, the char x[0]; trick does the job correctly.





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:11    [W:1.433 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site