[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW7sOV8koFENP-dzfxvah+qu3QUq3FmY7dj_pOGJgcNxRg@mail.gmail.com>
Date: Sat, 18 Dec 2021 01:01:43 -0800
From: Song Liu <song@...nel.org>
To: Daniel Vacek <neelx.g@...il.com>
Cc: stockhausen@...logia.de, open list <linux-kernel@...r.kernel.org>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
linux-raid <linux-raid@...r.kernel.org>, masahiroy@...nel.org,
williams@...hat.com
Subject: Re: [PATCH] lib/raid6: fix abnormally high latency
On Fri, Dec 17, 2021 at 1:43 PM Daniel Vacek <neelx.g@...il.com> wrote:
>
> Hello,
>
> This is perfectly correct and expected result. Further explanation
> follows down below.
>
> On Wed, Dec 15, 2021 at 8:41 PM <yajun.deng@...ux.dev> wrote:
> >
> > December 15, 2021 1:27 AM, "Song Liu" <song@...nel.org> wrote:
> >
> > > On Mon, Dec 13, 2021 at 7:17 PM Yajun Deng <yajun.deng@...ux.dev> wrote:
> > >
> > >> We found an abnormally high latency when executing modprobe raid6_pq, the
> > >> latency is greater than 1.2s when CONFIG_PREEMPT_VOLUNTARY=y, greater than
> > >> 67ms when CONFIG_PREEMPT=y, and greater than 16ms when CONFIG_PREEMPT_RT=y.
> > >> This is caused by disable the preemption, this time is too long and
> > >> unreasonable. We just need to disable migration. so used migrate_disable()/
> > >> migrate_enable() instead of preempt_disable()/preempt_enable(). This is
> > >> beneficial for CONFIG_PREEMPT=y or CONFIG_PREEMPT_RT=y, but no effect for
> > >> CONFIG_PREEMPT_VOLUNTARY=y.
> > >>
> > >> Fixes: fe5cbc6e06c7 ("md/raid6 algorithms: delta syndrome functions")
> > >> Signed-off-by: Yajun Deng <yajun.deng@...ux.dev>
> > >
> > > We measure the speed of different RAID algorithms.If we don't disable
> > > preempt, the result may be inaccurate, right? IIUC, we only disable preempt
> > > for 16 jiffies. Why do we see 1.2 second delay?
> >
> > Here are the command of my test:
> > Execute "sudo cyclictest -S -p 95 -d 0 -i 1000 -D 24h -m" in one terminal and "sudo modprobe raid6_pq" in the other terminal.
> >
> > Here are the results of my test:
> > CONFIG_PREEMPT_VOLUNTARY=y,CONFIG_HZ_250=y
> > T:17 ( 3109) P:95 I:1000 C: 7255 Min: 1 Act: 2 Avg: 170 Max: 1220832
>
> No preemption is expected with this config so the CPU is busy and
> occupied for full duration of all the benchmarks.
>
> > CONFIG_PREEMPT=y,CONFIG_HZ_250=y
> > T: 2 ( 2462) P:95 I:1000 C: 49024 Min: 1 Act: 2 Avg: 4 Max: 67888
>
> 16 jiffies with 250 Hz equals to 64 ms. So again, this result is
> perfectly expected. The benchmarks can be preempted in between the
> individual measurements with preemptible kernel configuration.
>
> > CONFIG_PREEMPT_RT=y,CONFIG_HZ_1000=y
> > T: 6 ( 2561) P:95 I:1000 C: 25284 Min: 3 Act: 3 Avg: 4 Max: 16593
>
> 16 jiffies by 1000 Hz is 16 ms. Ditto. So far so good.
Thanks for the explanation. I misread/misunderstood some of these results.
I dropped the patch from md-next.
Song
Powered by blists - more mailing lists