[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <520C0A42-3C42-4E60-A305-6F45B4C57A62@nvidia.com>
Date: Mon, 1 Mar 2021 16:03:28 -0500
From: Zi Yan <ziy@...dia.com>
To: Matthew Wilcox <willy@...radead.org>
CC: <linux-fsdevel@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
Mike Kravetz <mike.kravetz@...cle.com>
Subject: Re: [PATCH v3 01/25] mm: Introduce struct folio
On 1 Mar 2021, at 15:53, Matthew Wilcox wrote:
> On Mon, Mar 01, 2021 at 03:26:11PM -0500, Zi Yan wrote:
>>> +static inline struct folio *next_folio(struct folio *folio)
>>> +{
>>> + return folio + folio_nr_pages(folio);
>>
>> Are you planning to make hugetlb use folio too?
>
> Eventually, probably. It's not my focus.
>
>> If yes, this might not work if we have CONFIG_SPARSEMEM && !CONFIG_SPARSEMEM_VMEMMAP
>> with a hugetlb folio > MAX_ORDER, because struct page might not be virtually contiguous.
>> See the experiment I did in [1].
>>
>> [1] https://lore.kernel.org/linux-mm/16F7C58B-4D79-41C5-9B64-A1A1628F4AF2@nvidia.com/
>
> I thought we were going to forbid that configuration? ie no pages
> larger than MAX_ORDER with (SPARSEMEM && !SPARSEMEM_VMEMMAP)
>
> https://lore.kernel.org/linux-mm/312AECBD-CA6D-4E93-A6C1-1DF87BABD92D@nvidia.com/
>
> is somewhere else we were discussing this.
That is my plan for 1GB THP, making it depend on SPARSEMEM_VMEMMAP,
otherwise the THP code will be too complicated to read. My concern
is just about using folio in hugetlb, since
If hugetlb is not using folio soon, the patch looks good to me.
Reviewed-by: Zi Yan <ziy@...dia.com>
—
Best Regards,
Yan Zi
Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)
Powered by blists - more mailing lists