lkml.org 
[lkml]   [2003]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] blockgroup_lock: hashed spinlocks for ext2 and ext3
From
Date
On Sun, 2003-04-13 at 12:00, Linux Kernel Mailing List wrote:

[....]
>
> These locks are actually fairly generic. However I presented it as something
> which is specific to ext2 and ext3 so that people wouldn't go using them all
> over the place. They consume a lot of storage.
>

> +
> +struct bgl_lock {
> + spinlock_t lock;
> +} ____cacheline_aligned_in_smp;
> +
> +struct blockgroup_lock {
> + struct bgl_lock locks[NR_BG_LOCKS];
> +};

Why don't you use per_cpu data for this ? It can be indexed as well
with per_cpu() and it would safe a lot of space because the padding
would not be all wasted. If you want more than NR_CPUS locks it could be
done using a simple two level index scheme.

-Andi



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