> 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/
This archive was generated by hypermail 2b29 : Wed Oct 31 2001 - 21:00:37 EST