lkml.org 
[lkml]   [2001]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Pls apply this spinlock patch to the kernel
Date
From
> and occupies the full cacheline. The five hottest spinlocks for this 
> work load are set to that type (kmap_lock, lru_list_lock,
> pagecache_lock, kernel_flag, pagemap_lru_lock) The change is done in
> the common code, except for the kernel_flag.

That seems overkill. What you are saying is that static spinlocks need
to be declared in some cases to be followed by padding.

> +static spinlock_cacheline_t lru_list_lock_cacheline = {SPIN_LOCK_UNLOCKED};
> +#define lru_list_lock lru_list_lock_cacheline.lock

So why not just add a macro for aligning then do

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 ?

Alan
-
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:11    [W:0.058 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site