[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250807085521.bhs2o6wk6pe7xf5x@master>
Date: Thu, 7 Aug 2025 08:55:21 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Zi Yan <ziy@...dia.com>
Cc: David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
"Liam R. Howlett" <Liam.Howlett@...cle.com>,
Nico Pache <npache@...hat.com>, Ryan Roberts <ryan.roberts@....com>,
Dev Jain <dev.jain@....com>, Barry Song <baohua@...nel.org>,
Vlastimil Babka <vbabka@...e.cz>, Mike Rapoport <rppt@...nel.org>,
Suren Baghdasaryan <surenb@...gle.com>,
Michal Hocko <mhocko@...e.com>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 2/4] mm/huge_memory: move to next folio after
folio_split() succeeds.
On Tue, Aug 05, 2025 at 10:20:43PM -0400, Zi Yan wrote:
[...]
>
>- if (in_folio_offset < 0 ||
>- in_folio_offset >= folio_nr_pages(folio)) {
>+ if (in_folio_offset < 0 || in_folio_offset >= nr_pages) {
> if (!split_folio_to_order(folio, target_order))
> split++;
> } else {
>- struct page *split_at = folio_page(folio,
>- in_folio_offset);
>- if (!folio_split(folio, target_order, split_at, NULL))
>+ struct page *split_at =
>+ folio_page(folio, in_folio_offset);
>+ if (!folio_split(folio, target_order, split_at, NULL)) {
> split++;
>+ addr += PAGE_SIZE * nr_pages;
>+ }
Are we sure addr points to the folio start?
--
Wei Yang
Help you, Help me
Powered by blists - more mailing lists