From: Andi Kleen <andi@firstfloor.org>
To: linux-btrfs@vger.kernel.org
Cc: sensille@gmx.net
Subject: Re: [PATCH v3 3/6] btrfs: add scrub code and prototypes
Date: Wed, 16 Mar 2011 15:07:36 -0700 [thread overview]
Message-ID: <m2mxkulnx3.fsf@firstfloor.org> (raw)
In-Reply-To: <7ccafb5250b72ca706369a8d5b45f06e8d5a4f8a.1299941055.git.sensille@gmx.net> (Arne Jansen's message of "Sat, 12 Mar 2011 15:50:42 +0100")
Arne Jansen <sensille@gmx.net> writes:
> + */
> + mutex_lock(&fs_info->scrub_lock);
> + atomic_inc(&fs_info->scrubs_running);
> + mutex_unlock(&fs_info->scrub_lock);
It seems odd to protect an atomic_inc with a mutex.
Is that done for some side effect? Otherwise you either
don't need atomic or don't need the lock.
That seems to be all over the source file.
> +int btrfs_scrub_pause(struct btrfs_root *root)
> +{
> + struct btrfs_fs_info *fs_info = root->fs_info;
> + mutex_lock(&fs_info->scrub_lock);
As I understand it you take that mutex on every transaction
commit, which is a fast path for normal IO.
For me that looks like a scalability problem with enough
cores. Did you do any performance testing of this on a system
with a reasonable number of cores?
btrfs already has enough scalability problems, please don't
add new ones.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2011-03-16 22:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 14:50 [PATCH v3 0/6] btrfs: scrub Arne Jansen
2011-03-12 14:50 ` [PATCH v3 1/6] btrfs: add parameter to btrfs_lookup_csum_range Arne Jansen
2011-03-12 14:50 ` [PATCH v3 2/6] btrfs: make struct map_lookup public Arne Jansen
2011-03-12 14:50 ` [PATCH v3 3/6] btrfs: add scrub code and prototypes Arne Jansen
2011-03-13 23:50 ` Ilya Dryomov
2011-03-14 9:57 ` Arne Jansen
2011-03-16 14:35 ` Ilya Dryomov
2011-03-16 14:54 ` Ilya Dryomov
2011-03-16 22:07 ` Andi Kleen [this message]
2011-03-16 23:10 ` Arne Jansen
2011-03-17 19:02 ` Arne Jansen
2011-03-12 14:50 ` [PATCH v3 4/6] btrfs: sync scrub with commit & device removal Arne Jansen
2011-03-12 14:50 ` [PATCH v3 5/6] btrfs: add state information for scrub Arne Jansen
2011-03-12 14:50 ` [PATCH v3 6/6] btrfs: new ioctls " Arne Jansen
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=m2mxkulnx3.fsf@firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=sensille@gmx.net \
/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;
as well as URLs for NNTP newsgroup(s).