public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Lachlan McIlroy <lachlan@sgi.com>
Cc: David Chinner <dgc@sgi.com>, xfs-dev@sgi.com, xfs@oss.sgi.com
Subject: Re: Review: Reduce in-core superblock lock contention near ENOSPC
Date: Mon, 4 Dec 2006 10:49:28 +1100	[thread overview]
Message-ID: <20061203234928.GA37654165@melbourne.sgi.com> (raw)
In-Reply-To: <457080EA.1010807@sgi.com>

On Fri, Dec 01, 2006 at 07:22:18PM +0000, Lachlan McIlroy wrote:
> David Chinner wrote:
> >On Thu, Nov 30, 2006 at 06:03:40PM +0000, Lachlan McIlroy wrote:
> >I think the slow path code is somewhat clearer with a separate
> >mutex - it clearly documents the serialisation barrier that
> >the slow path uses and allows us to do slow path checks on the
> >per-cpu counters without needing the SB_LOCK.
> 
> It's certainly an improvement over the original code.
> 
> >
> >It also means that in future, we can slowly remove the need for
> >holding the SB_LOCK across the entire rebalance operation and only
> >use it when referencing the global superblock fields during
> >the rebalance.
> 
> Sounds good.
> 
> >
> >If the need arises, it also means we can move to a mutex per counter
> >so we can independently rebalance different types of counters at the
> >same time (which we can't do right now).
> 
> That seems so obvious - I'm surprised we can't do it now.

Well, the reason I didn't go down this path in the first place
was that typically only one type of counter would need rebalancing
at a time (e.g. free blocks or free inodes, but not both at the
same time). I tested this out on revenue2 with simultaneous creates
and deletes of small files but could not cause contention on the
single global lock under these loads. i also tried parallel
writes of large files with creates and deletes, but hte create/delete
was slowed sufficiently by the parallel writes that it once again
didn't cause an issue.

Hence it didn't seem to be an issue and a single lock simplified
the initial implementation. What I'm thinking now is that it may
become an issue with MDFS as acheivable create and delete rates
should be much higher on one of these filesystems and then it may
prove to be an issue.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2006-12-03 23:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23  4:41 Review: Reduce in-core superblock lock contention near ENOSPC David Chinner
2006-11-30 18:03 ` Lachlan McIlroy
2006-11-30 22:38   ` David Chinner
2006-12-01  0:41     ` David Chinner
2006-12-01 20:12       ` Lachlan McIlroy
2006-12-01 19:22     ` Lachlan McIlroy
2006-12-03 23:49       ` David Chinner [this message]
2006-12-05 11:46         ` Klaus Strebel
2006-12-05 21:55           ` David Chinner
2006-12-06  8:43             ` Lachlan McIlroy
2006-12-08  5:16               ` David Chinner

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=20061203234928.GA37654165@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=lachlan@sgi.com \
    --cc=xfs-dev@sgi.com \
    --cc=xfs@oss.sgi.com \
    /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