[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f8ac35d-89f0-41e7-acfb-bcf54991612e@redhat.com>
Date: Mon, 23 Jun 2025 16:13:17 +0200
From: David Hildenbrand <david@...hat.com>
To: Oscar Salvador <osalvador@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: Muchun Song <muchun.song@...ux.dev>, Peter Xu <peterx@...hat.com>,
Gavin Guo <gavinguo@...lia.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/5] mm,hugetlb: Rename anon_rmap to new_anon_folio and
make it boolean
On 20.06.25 14:30, Oscar Salvador wrote:
> anon_rmap is used to determine whether the new allocated folio is anonymous.
> Rename it to something more meaningul like new_anon_folio and make it boolean,
> as we use it like that.
> While we are at it, drop 'new_pagecache_folio' as 'new_anon_folio' is enough to
> check whether we need to restore the consumed reservation.
>
> Signed-off-by: Oscar Salvador <osalvador@...e.de>
> ---
}
> @@ -6640,7 +6638,8 @@ static vm_fault_t hugetlb_no_page(struct address_space *mapping,
> backout:
> spin_unlock(vmf->ptl);
> backout_unlocked:
> - if (new_folio && !new_pagecache_folio)
> + /* We only need to restore reservations for private mappings */
> + if (new_folio && new_anon_folio)
Could this be simplified to
if (new_anon_folio) {
...
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists