lkml.org 
[lkml]   [2001]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Pls apply this spinlock patch to the kernel

Hi,

> spinlock_t pagecache_lock ____cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
> cache_line_pad;
>
> where cache_line_pad is an asm(".align") - I would assume that is
> sufficient - Linus ?

In include/asm-ppc64/cache.h I ended up redefining ____cacheline_aligned_in_smp
to avoid the problem of things sharing a cacheline:

#ifdef CONFIG_SMP
#define ____cacheline_aligned_in_smp __cacheline_aligned
#else
#define ____cacheline_aligned_in_smp
#endif /* CONFIG_SMP */

so that these things end up in the cacheline_aligned section and no variables
share a cacheline. Maybe there are some places where we want to group
variables in the same cacheline, but for consistency I think we should
have:

__cacheline_aligned{,_in_smp}
variable goes into cacheline_aligned section

____cacheline_aligned{,_in_smp}
just align to a cacheline

Anton
-
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 13:18    [W:0.063 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site