Re: [PATCH -next 3/3] md: use interruptible apis in idle/frozen_sync_thread()

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

 



On Mon, Jan 29, 2024 at 11:04 PM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> 在 2024/01/30 14:37, Song Liu 写道:
> > Hi,
> >
> > Sorry for the late reply.
> >
> > The first two patches of the set look good, so I applied them to
> > md-tmp-6.9 branch. However, this one needs a respin.
>
> We are fixing dm-raid regressions, so I'll not send a new version until
> that work is done. :)

Sure. Fixing the regression is more urgent.

> >
> > On Thu, Dec 28, 2023 at 4:58 AM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:
> >>
> >> From: Yu Kuai <yukuai3@xxxxxxxxxx>
[...]
> > I found prepare_to_stop_sync_thread very hard to reason. Please try to
> > rephrase the comment or refactor the code. Maybe it makes sense to put
> > the following logic and its variations to a separate function:
> >
> >          if (prepare_to_stop_sync_thread(mddev, false)) {
> >                  wait_event(resync_wait, sync_thread_stopped(mddev, NULL));
> >                  mddev_lock_nointr(mddev);
> >          }
>
> I can do this, but there are 5 callers and only two of them can use the
> separate caller. Pehaps something like this?
>
> void stop_sync_thread(struct mddev *mddev, bool wait_sb)
> {
>         if (prepare_to_stop_sync_thread(mddev, wait_sb)) {
>                 wait_event(resync_wait, ...);
>                 if (!wait_sb) {
>                         mddev_lock_nointr(mddev);
>                         return;
>                 }
>         }
>
>         if (wait_sb) {
>                 wait_event(sb_wait, ...);
>                 mddev_lock_nointr(mddev);
>         }
> }

I don't really like this version either. Let's think more about this
after fixing the dm-raid regressions.

Thanks,
Song

>
> int stop_sync_thread_interruptible(struct mddev *mddev, bool check_sync_seq)
> {
> ...
> }





[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