All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Kuai <yukuai1@huaweicloud.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>, Yu Kuai <yukuai1@huaweicloud.com>
Cc: song@kernel.org, linux-raid@vger.kernel.org,
	linux-kernel@vger.kernel.org, yi.zhang@huawei.com,
	"yukuai (C)" <yukuai3@huawei.com>
Subject: Re: [PATCH -next 0/3] md/raid10: reduce lock contention for io
Date: Wed, 31 Aug 2022 20:07:15 +0800	[thread overview]
Message-ID: <1df89f4f-4e3a-8683-89c9-6e048ed79119@huaweicloud.com> (raw)
In-Reply-To: <39f59994-cf2e-f8c4-fd57-988e8c7e05e5@molgen.mpg.de>

Hi, Paul!

在 2022/08/31 19:59, Paul Menzel 写道:
> Dear Yu,
> 
> 
> Am 30.08.22 um 03:09 schrieb Yu Kuai:
> 
>> 在 2022/08/29 21:58, Paul Menzel 写道:
> 
>>> Am 29.08.22 um 15:14 schrieb Yu Kuai:
>>>> From: Yu Kuai <yukuai3@huawei.com>
>>>>
>>>> patch 1 is a small problem found by code review.
>>>> patch 2 avoid holding resync_lock in fast path.
>>>> patch 3 avoid holding lock in wake_up() in fast path.
>>>>
>>>> Test environment:
>>>>
>>>> Architecture: aarch64
>>>> Cpu: Huawei KUNPENG 920, there are four numa nodes
>>>>
>>>> Raid10 initialize:
>>>> mdadm --create /dev/md0 --level 10 --bitmap none --raid-devices 4 
>>>> /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1
>>>>
>>>> Test cmd:
>>>> fio -name=0 -ioengine=libaio -direct=1 -group_reporting=1 
>>>> -randseed=2022 -rwmixread=70 -refill_buffers -filename=/dev/md0 
>>>> -numjobs=16 -runtime=60s -bs=4k -iodepth=256 -rw=randread
>>>>
>>>> Test result:
>>>> before this patchset:    2.9 GiB/s
>>>> after this patchset:    6.6 Gib/s
>>>
>>> Could you please give more details about the test setup, like the 
>>> drives used?
>>
>> test setup is described above, four nvme disks is used.
> 
> I was wondering about the model to be able to reproduce it.
> 
>>> Did you use some tools like ftrace to figure out the bottleneck?
>>
>> Yes, I'm sure the bottleneck is spin_lock(), specifically threads from
>> multiple nodes try to grab the same lock. By the way, if I bind the
>> threads to the same node, performance can also improve to 6.6 Gib/s
>> without this patchset.
> 
> Interesting. Maybe you could add all that to the commit message of the 
> second patch.

Of course, I will do that in next version.

Thanks,
Kuai
> 
> 
> Kind regards,
> 
> Paul
> 
> 
>>>> Please noted that in kunpeng-920, memory access latency is very bad
>>>> accross nodes compare to local node, and in other architecture
>>>> performance improvement might not be significant.
>>>>
>>>> Yu Kuai (3):
>>>>    md/raid10: fix improper BUG_ON() in raise_barrier()
>>>>    md/raid10: convert resync_lock to use seqlock
>>>>    md/raid10: prevent unnecessary calls to wake_up() in fast path
>>>>
>>>>   drivers/md/raid10.c | 88 
>>>> +++++++++++++++++++++++++++++----------------
>>>>   drivers/md/raid10.h |  2 +-
>>>>   2 files changed, 59 insertions(+), 31 deletions(-)
> .
> 


  reply	other threads:[~2022-08-31 12:07 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-29 13:14 [PATCH -next 0/3] md/raid10: reduce lock contention for io Yu Kuai
2022-08-29 13:15 ` [PATCH -next 1/3] md/raid10: fix improper BUG_ON() in raise_barrier() Yu Kuai
2022-08-29 19:53   ` John Stoffel
2022-08-30  1:01     ` Yu Kuai
2022-08-30  6:32     ` Paul Menzel
2022-08-29 13:15 ` [PATCH -next 2/3] md/raid10: convert resync_lock to use seqlock Yu Kuai
2022-09-01 18:41   ` Logan Gunthorpe
2022-09-02  0:49     ` Guoqing Jiang
2022-09-02  0:56       ` Logan Gunthorpe
2022-09-02  1:00         ` Guoqing Jiang
2022-09-02  1:21     ` Yu Kuai
2022-09-02  8:14       ` Yu Kuai
2022-09-02 17:03         ` Logan Gunthorpe
2022-09-03  6:07           ` Yu Kuai
2022-09-02  9:42   ` Guoqing Jiang
2022-09-02 10:02     ` Yu Kuai
2022-09-02 10:16       ` Guoqing Jiang
2022-09-02 10:53         ` Yu Kuai
2022-08-29 13:15 ` [PATCH -next 3/3] md/raid10: prevent unnecessary calls to wake_up() in fast path Yu Kuai
2022-08-29 13:40 ` [PATCH -next 0/3] md/raid10: reduce lock contention for io Guoqing Jiang
2022-08-31 11:55   ` Yu Kuai
2022-08-29 13:58 ` Paul Menzel
2022-08-30  1:09   ` Yu Kuai
2022-08-31 11:59     ` Paul Menzel
2022-08-31 12:07       ` Yu Kuai [this message]
2022-08-31 18:00 ` Song Liu
2022-09-03  6:08   ` Yu Kuai
2022-09-09 14:45     ` Song Liu

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=1df89f4f-4e3a-8683-89c9-6e048ed79119@huaweicloud.com \
    --to=yukuai1@huaweicloud.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=song@kernel.org \
    --cc=yi.zhang@huawei.com \
    --cc=yukuai3@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.