[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVMFT+hrePumXlDU@casper.infradead.org>
Date: Tue, 28 Sep 2021 13:06:39 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Song Liu <song@...nel.org>
Cc: Rongwei Wang <rongwei.wang@...ux.alibaba.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
William Kucharski <william.kucharski@...cle.com>,
Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH v2 1/2] mm, thp: check page mapping when truncating page
cache
On Mon, Sep 27, 2021 at 03:24:47PM -0700, Song Liu wrote:
> OTOH, does it make sense to block writes within khugepaged, like:
> @@ -1652,6 +1653,11 @@ static void collapse_file(struct mm_struct *mm,
> /* Only allocate from the target node */
> gfp = alloc_hugepage_khugepaged_gfpmask() | __GFP_THISNODE;
>
> + if (deny_write_access(file)) {
> + result = SCAN_BUSY_WRITE;
> + return;
> + }
The problem is that it denies, rather than blocking. That means that the
writer gets ETXTBSY instead of waiting until khugepaged is done.
Powered by blists - more mailing lists