[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlZfHNkWHxtpcXhO@casper.infradead.org>
Date: Tue, 28 May 2024 23:47:56 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
akpm@...ux-foundation.org, vishal.moola@...cle.com,
muchun.song@...ux.dev, david@...hat.com, osalvador@...e.de
Subject: Re: [PATCH] mm/hugetlb: mm/memory_hotplug: use a folio in
scan_movable_pages()
On Tue, May 28, 2024 at 03:03:21PM -0700, Sidhartha Kumar wrote:
> @@ -1761,9 +1762,9 @@ static int scan_movable_pages(unsigned long start, unsigned long end,
> * cases false positives and negatives are possible. Calling
> * code must deal with these scenarios.
> */
> - if (HPageMigratable(head))
> + if (folio_test_hugetlb_migratable(folio))
> goto found;
> - skip = compound_nr(head) - (pfn - page_to_pfn(head));
> + skip = folio_nr_pages(folio) - folio_page_idx(folio, page);
> pfn += skip - 1;
Isn't this an unnecessarily complicated way of writing:
pfn |= folio_nr_pages(folio) - 1;
?
Powered by blists - more mailing lists