From: Christoph Hellwig <hch@infradead.org>
To: Dave Chinner <david@fromorbit.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfs: reduce lock traffic on incore sb lock
Date: Wed, 29 Sep 2010 00:04:25 -0400 [thread overview]
Message-ID: <20100929040425.GA29691@infradead.org> (raw)
In-Reply-To: <1285721500-5671-1-git-send-email-david@fromorbit.com>
On Wed, Sep 29, 2010 at 10:51:40AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
>
> Under heavy parallel unlink workloads, the incore superblock lock is
> heavily trafficed in xfs_mod_incore_sb_batch(). This is despite the
> fact that the counters being modified are typically the counters
> that are per-cpu and do not require the lock. IOWs, we are locking
> and unlocking the superblock lock needlessly, and the result is that
> it is third most heavily contended lock in the system under these
> workloads.
>
> Fix this by only locking the superblock lock when we are modifying a
> counter protected by it. This completely removes the m_sb_lock from
> lock_stat traces during create/remove workloads.
God spot of the idiocy there, but I really don't like the patch.
I've started writing a small patches series solving the issue slightly
better by cleaning up this area a bit.
After this we will never use xfs_mod_incore_sb/xfs_mod_incore_sb_batch
for the percpu counters but rather make those always go through
xfs_icsb_modify_counters. I'll need to quickly finish it up and will
send it out soon.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-09-29 4:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 0:51 [PATCH] xfs: reduce lock traffic on incore sb lock Dave Chinner
2010-09-29 4:04 ` Christoph Hellwig [this message]
2010-09-29 5:57 ` Dave Chinner
2010-09-29 6:13 ` Christoph Hellwig
2010-09-29 6:28 ` Dave 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=20100929040425.GA29691@infradead.org \
--to=hch@infradead.org \
--cc=david@fromorbit.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