mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Alex Tomas <bzzz@tmi.comex.ru>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@digeo.com>
Subject: Re: [PATCH] concurrent block allocation for ext3
Date: Mon, 10 Mar 2003 09:25:46 -0700	[thread overview]
Message-ID: <20030310092546.D12806@schatzie.adilger.int> (raw)
In-Reply-To: <m3zno3grfz.fsf@lexa.home.net>; from bzzz@tmi.comex.ru on Mon, Mar 10, 2003 at 06:41:04PM +0300

On Mar 10, 2003  18:41 +0300, Alex Tomas wrote:
> Here is the small patch which implements concurrent block allocation
> for ext3. It removes lock_super() in ext3_new_block() and ext3_free_blocks().
> Modifications of counters in superblock and group descriptors are protected
> by spinlock. Tested on SMP for several hours.

Any ideas on how much this improves the performance?  What sort of tests
were you running?  We could improve things a bit further by having separate
per-group locks for the update of the group descriptor info, and only
lazily update the superblock at statfs and unmount time (with a suitable
feature flag so e2fsck can fix this up at recovery time), but you seem
to have gotten the majority of the parallelism from this fix.

> @@ -214,11 +213,13 @@
>  				      block + i);
>  			BUFFER_TRACE(bitmap_bh, "bit already cleared");
>  		} else {
> +			spin_lock(&EXT3_SB(sb)->s_alloc_lock);
>  			dquot_freed_blocks++;
>  			gdp->bg_free_blocks_count =
>  			  cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)+1);
>  			es->s_free_blocks_count =
>  			  cpu_to_le32(le32_to_cpu(es->s_free_blocks_count)+1);
> +			spin_unlock(&EXT3_SB(sb)->s_alloc_lock);

One minor nit is that you left an ext3_error() for the "bit already cleared"
case just above this patch hunk.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


  reply	other threads:[~2003-03-10 16:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-10 15:41 Alex Tomas
2003-03-10 16:25 ` Andreas Dilger [this message]
2003-03-10 16:33   ` Alex Tomas
2003-03-10 16:43   ` Daniel Phillips
2003-03-14 21:22 ` Martin J. Bligh
2003-03-15  2:56   ` Martin J. Bligh
2003-03-15  6:08     ` Martin J. Bligh

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=20030310092546.D12806@schatzie.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=akpm@digeo.com \
    --cc=bzzz@tmi.comex.ru \
    --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

all inboxes | Powered by JetHome®