[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=XAJnWL8YHok8RcgR8aK5igKfvE2iD7aW7Rpr4cDVJedQ@mail.gmail.com>
Date: Mon, 24 Apr 2023 09:56:58 -0700
From: Doug Anderson <dianders@...omium.org>
To: Hillf Danton <hdanton@...a.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Yu Zhao <yuzhao@...gle.com>,
Matthew Wilcox <willy@...radead.org>
Subject: Re: [PATCH v2 1/4] mm/filemap: Add folio_lock_timeout()
Hi,
On Fri, Apr 21, 2023 at 10:19 PM Hillf Danton <hdanton@...a.com> wrote:
>
> On 21 Apr 2023 15:12:45 -0700 Douglas Anderson <dianders@...omium.org>
> > Add a variant of folio_lock() that can timeout. This is useful to
> > avoid unbounded waits for the page lock in kcompactd.
>
> Given no mutex_lock_timeout() (perhaps because timeout makes no sense for
> spinlock), I suspect your fix lies in the right layer.
I'm not 100% sure I understood the above comment, but I think you're
saying that the approach my patch takes seems OK.
> If waiting for
> page under IO causes trouble for you, another simpler option is make
> IO faster (perhaps all you can do) for instance.
Yeah, this gets into the discussion about whether our current squashfs
settings actually make sense. I suspect that they don't and that we
should look into EROFS like Gao suggested, or at least choose
different squashfs settings (smaller block sizes, ZSTD instead of
zlib). Unfortunately I believe that the current squashfs settings were
chosen because disk space is a concern.
> 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.
-Doug
Powered by blists - more mailing lists