Re: [PATCH v2 1/4] mm/filemap: Add folio_lock_timeout()

Hillf Danton
2023-04-25T01:09:36Z

On 24 Apr 2023 09:56:58 -0700 Douglas Anderson <dianders@chromium.org>
> On Fri, Apr 21, 2023 at 10:19=E2=80=AFPM Hillf Danton <hdanton@sina.com> wrote:
> > If kcompactd is waken
> > up by kswapd, waiting for slow IO is the right thing to do.
>
> I don't have enough intuition here, so I'm happy to take others'
> advice here. I guess my thought was that kcompactd is explicitly not
> using the full "sync" and instead choosing the "sync light". To me
> that means we shouldn't block for _too_ long.

Take a look at another case of lock wait [1].

[1] https://lore.kernel.org/lkml/CAHk-=wgyL9OujQ72er7oXt_VsMeno4bMKCTydBT1WSaagZ_5CA@mail.gmail.com/