[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPhsuW5-Rg8F2R-zkA5YWbjdz7TcNUsXUivDMwH+s-PxjKjAcg@mail.gmail.com>
Date: Mon, 29 Jan 2024 23:34:41 -0800
From: Song Liu <song@...nel.org>
To: Yu Kuai <yukuai1@...weicloud.com>
Cc: neilb@...e.de, linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org,
yi.zhang@...wei.com, yangerkun@...wei.com, "yukuai (C)" <yukuai3@...wei.com>
Subject: Re: [PATCH -next 3/3] md: use interruptible apis in idle/frozen_sync_thread()
On Mon, Jan 29, 2024 at 11:04 PM Yu Kuai <yukuai1@...weicloud.com> 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@...weicloud.com> wrote:
> >>
> >> From: Yu Kuai <yukuai3@...wei.com>
[...]
> > 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)
> {
> ...
> }
Powered by blists - more mailing lists