public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: akpm@digeo.com
Subject: Re: [PATCH] blockgroup_lock: hashed spinlocks for ext2 and ext3
Date: 14 Apr 2003 22:06:21 +0200	[thread overview]
Message-ID: <1050350782.7912.400.camel@averell> (raw)
In-Reply-To: <200304131113.h3DBDvj2004773@hera.kernel.org>

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




       reply	other threads:[~2003-04-14 19:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200304131113.h3DBDvj2004773@hera.kernel.org>
2003-04-14 20:06 ` Andi Kleen [this message]
2003-04-14 21:38   ` [PATCH] blockgroup_lock: hashed spinlocks for ext2 and ext3 Andrew Morton
2003-04-14 21:46     ` Andi Kleen
2003-04-14 21:58       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1050350782.7912.400.camel@averell \
    --to=ak@suse.de \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox