[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yh01WH6CdHjpUFkZ@casper.infradead.org>
Date: Mon, 28 Feb 2022 20:49:28 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Hugh Dickins <hughd@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH next] mm/migrate: fix remove_migration_pte() of hugetlb
entry
On Sat, Feb 26, 2022 at 06:25:15PM -0800, Hugh Dickins wrote:
> - if (!folio_test_ksm(folio))
> + /* Skip call in common case, plus .pgoff is invalid for KSM */
> + if (pvmw.nr_pages != 1 && !folio_test_hugetlb(folio))
> idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
How do you feel about this instead?
- if (!folio_test_ksm(folio))
+ /* pgoff is invalid for ksm pages, but they are never large */
+ if (folio_test_large(folio) && !folio_test_hugetlb(folio))
idx = linear_page_index(vma, pvmw.address) - pvmw.pgoff;
Powered by blists - more mailing lists