Re: [PATCHv3] md/raid1: Avoid lock contention from wake_up()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 6, 2023 at 2:29 PM Jinpu Wang <jinpu.wang@xxxxxxxxx> wrote:
>
> On Thu, Jul 6, 2023 at 8:14 AM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
> >
> > 在 2023/07/05 19:32, Jack Wang 写道:
> > > wake_up is called unconditionally in a few paths such as make_request(),
> > > which cause lock contention under high concurrency workload like below
> > >      raid1_end_write_request
> > >       wake_up
> > >        __wake_up_common_lock
> > >         spin_lock_irqsave
> > >
> > > Improve performance by only call wake_up() if waitqueue is not empty
> > >
> > LGTM
> >
> > Reviewed-by: Yu Kuai <yukuai3@xxxxxxxxxx>
> Kuai,
> Thank you very much for the review and suggestions!
>
> >
> > > Fio test script:
> > >
> > > [global]
> > > name=random reads and writes
> > > ioengine=libaio
> > > direct=1
> > > readwrite=randrw
> > > rwmixread=70
> > > iodepth=64
> > > buffered=0
> > > filename=/dev/md0
> > > size=1G
> > > runtime=30
> > > time_based
> > > randrepeat=0
> > > norandommap
> > > refill_buffers
> > > ramp_time=10
> > > bs=4k
> > > numjobs=400
> > > group_reporting=1
> > > [job1]
> > >
> > > Test result with 2 ramdisk in raid1 on a Intel Broadwell 56 cores server.
> > >
> > >       Before this patch       With this patch
> > >       READ    BW=4621MB/s     BW=7337MB/s
> > >       WRITE   BW=1980MB/s     BW=3144MB/s
> > >
> > > The patch is inspired by Yu Kuai's change for raid10:
> > > https://lore.kernel.org/r/20230621105728.1268542-1-yukuai1@xxxxxxxxxxxxxxx
> > >
> > > Cc: Yu Kuai <yukuai3@xxxxxxxxxx>
> > > Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> > > ---

Applied to md-next. Thanks!

Song




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux