From: Gal Ofri <gal.ofri@storing.io>
To: "NeilBrown" <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, "Song Liu" <song@kernel.org>
Subject: Re: [PATCH] md/raid5: reduce lock contention in read_one_chunk()
Date: Fri, 4 Jun 2021 11:42:05 +0300 [thread overview]
Message-ID: <20210604114205.3daf3e68@gofri-dell> (raw)
In-Reply-To: <162276306409.16225.1432054245490518080@noble.neil.brown.name>
On Fri, 04 Jun 2021 09:31:04 +1000
"NeilBrown" <neilb@suse.de> wrote:
Hey Neil,
thank you for your feedback !
> This surprises me. I only expect rwlocks to be a benefit when the
> readlock is held for significantly longer than the time it takes to get
> an uncontended lock, and I don't think that is happening here.
> However, you have done the measurements (thanks for that!) and I cannot
> argue with numbers.
To be honest, I expected spinlock to perform as well as rwlock in this case too,
but experiment proves otherwise (lock contention and iops are almost identical to before the patch).
Maybe it's because wait_event_lock_irq() is in the critical section ?
> Could you try that and report results? Thanks.
I patched the code as per your suggestion and it performs even better:
up to 4.2M iops with zero contention on that lock (~55GB throughput).
Since it only impacts quiesce now, I thought it'd be better to use spinlock afterall.
Please let me know if you think otherwise.
I'll run all tests again, rephrase where needed and resubmit.
Thanks,
Gal
next prev parent reply other threads:[~2021-06-04 8:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 13:54 [PATCH] md/raid5: reduce lock contention in read_one_chunk() gal.ofri
2021-06-03 23:31 ` NeilBrown
2021-06-04 8:42 ` Gal Ofri [this message]
2021-06-04 9:19 ` Gal Ofri
2021-06-05 0:30 ` NeilBrown
2021-06-06 15:10 ` Gal Ofri
2021-06-04 7:43 ` Guoqing Jiang
2021-06-04 8:53 ` Gal Ofri
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=20210604114205.3daf3e68@gofri-dell \
--to=gal.ofri@storing.io \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=song@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