[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210608125838.6ixdlz3t334gjnp7@box.shutemov.name>
Date: Tue, 8 Jun 2021 15:58:38 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Matthew Wilcox <willy@...radead.org>
Cc: Xu Yu <xuyu@...ux.alibaba.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, hughd@...gle.com,
akpm@...ux-foundation.org, gavin.dg@...ux.alibaba.com
Subject: Re: [PATCH v2] mm, thp: use head page in __migration_entry_wait
On Tue, Jun 08, 2021 at 01:32:21PM +0100, Matthew Wilcox wrote:
> On Tue, Jun 08, 2021 at 03:00:26PM +0300, Kirill A. Shutemov wrote:
> > But there's one quirk: if split succeed we effectively wait on wrong
> > page to be unlocked. And it may take indefinite time if split_huge_page()
> > was called on the head page.
>
> Hardly indefinite time ... callers of split_huge_page_to_list() usually
> unlock the page soon after. Actually, I can't find one that doesn't call
> unlock_page() within a few lines of calling split_huge_page_to_list().
I didn't check all callers, but it's not guaranteed by the interface and
it's not hard to imagine a future situation when a page got split on the
way to IO and kept locked until IO is complete.
The wake up shouldn't have much overhead as in most cases split going to
be called on the head page.
--
Kirill A. Shutemov
Powered by blists - more mailing lists