From: David Hildenbrand <david@redhat.com>
To: "Pankaj Raghav (Samsung)" <kernel@pankajraghav.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
Suren Baghdasaryan <surenb@google.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Vlastimil Babka <vbabka@suse.cz>, Zi Yan <ziy@nvidia.com>,
Mike Rapoport <rppt@kernel.org>,
Dave Hansen <dave.hansen@linux.intel.com>,
Michal Hocko <mhocko@suse.com>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Nico Pache <npache@redhat.com>, Dev Jain <dev.jain@arm.com>,
"Liam R . Howlett" <Liam.Howlett@oracle.com>,
Jens Axboe <axboe@kernel.dk>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
willy@infradead.org, x86@kernel.org, linux-block@vger.kernel.org,
Ritesh Harjani <ritesh.list@gmail.com>,
linux-fsdevel@vger.kernel.org,
"Darrick J . Wong" <djwong@kernel.org>,
mcgrof@kernel.org, gost.dev@samsung.com, hch@lst.de,
Pankaj Raghav <p.raghav@samsung.com>
Subject: Re: [PATCH 3/5] mm: add static huge zero folio
Date: Wed, 6 Aug 2025 14:36:51 +0200 [thread overview]
Message-ID: <9a657c84-99fe-41ba-88ca-097acab4b96b@redhat.com> (raw)
In-Reply-To: <iputzuntgitahlu3qu2sg5zbzido43ncykcefqawjpkbnvodtn@22gzzl5t77ct>
On 06.08.25 14:28, Pankaj Raghav (Samsung) wrote:
> On Wed, Aug 06, 2025 at 02:24:28PM +0200, David Hildenbrand wrote:
>> On 06.08.25 14:18, Pankaj Raghav (Samsung) wrote:
>>>> We could go one step further and special case in mm_get_huge_zero_folio() +
>>>> mm_put_huge_zero_folio() on CONFIG_STATIC_HUGE_ZERO_FOLIO.
>>>>
>>>
>>> Hmm, but we could have also failed to allocate even though the option
>>> was enabled.
>>
>> Then we return huge_zero_folio, which is NULL?
>>
>> Or what are you concerned about?
>
> But don't we want to keep the "dynamic" allocation part be present even
> though we failed to allocate it statically in the shrinker_init?
>
> Mainly so that the existing users of mm_get_huge_zero_folio() are not affected by
> these changes.
I would just keep it simple and say that if we fail the early allocation
(which will be extremely unlikely that early during boot!), just don't
ever try to reallocate, even not when we could through
mm_get_huge_zero_folio().
That sounds as simple as it gets. Again, failing to allocate that early
and then succeeding to allocate later is a fairly unlikely scenario.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-08-06 12:37 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 12:13 [PATCH 0/5] add static huge zero folio support Pankaj Raghav (Samsung)
2025-08-04 12:13 ` [PATCH 1/5] mm: rename huge_zero_page to huge_zero_folio Pankaj Raghav (Samsung)
2025-08-04 18:14 ` Zi Yan
2025-08-04 12:13 ` [PATCH 2/5] mm: rename MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO Pankaj Raghav (Samsung)
2025-08-04 15:24 ` Lorenzo Stoakes
2025-08-04 16:20 ` David Hildenbrand
2025-08-04 18:04 ` Zi Yan
2025-08-04 12:13 ` [PATCH 3/5] mm: add static huge zero folio Pankaj Raghav (Samsung)
2025-08-04 16:46 ` Lorenzo Stoakes
2025-08-04 17:07 ` David Hildenbrand
2025-08-04 17:08 ` David Hildenbrand
2025-08-04 17:18 ` Lorenzo Stoakes
2025-08-05 10:55 ` David Hildenbrand
2025-08-05 11:40 ` Pankaj Raghav (Samsung)
2025-08-05 12:10 ` David Hildenbrand
2025-08-05 13:40 ` Lorenzo Stoakes
2025-08-06 12:18 ` Pankaj Raghav (Samsung)
2025-08-06 12:24 ` David Hildenbrand
2025-08-06 12:28 ` Pankaj Raghav (Samsung)
2025-08-06 12:36 ` David Hildenbrand [this message]
2025-08-06 12:43 ` Pankaj Raghav (Samsung)
2025-08-06 12:48 ` David Hildenbrand
2025-08-05 16:33 ` Dave Hansen
2025-08-06 8:26 ` Pankaj Raghav (Samsung)
2025-08-04 12:13 ` [PATCH 4/5] mm: add largest_zero_folio() routine Pankaj Raghav (Samsung)
2025-08-04 16:50 ` Lorenzo Stoakes
2025-08-05 11:24 ` Pankaj Raghav (Samsung)
2025-08-04 18:13 ` Zi Yan
2025-08-05 16:42 ` Dave Hansen
2025-08-06 7:59 ` Pankaj Raghav (Samsung)
2025-08-04 12:13 ` [PATCH 5/5] block: use largest_zero_folio in __blkdev_issue_zero_pages() Pankaj Raghav (Samsung)
2025-08-04 16:53 ` Lorenzo Stoakes
2025-08-05 16:00 ` [PATCH 0/5] add static huge zero folio support Dave Hansen
2025-08-06 8:31 ` Pankaj Raghav (Samsung)
2025-08-06 11:28 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a657c84-99fe-41ba-88ca-097acab4b96b@redhat.com \
--to=david@redhat.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=baolin.wang@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dev.jain@arm.com \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=kernel@pankajraghav.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mcgrof@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=npache@redhat.com \
--cc=p.raghav@samsung.com \
--cc=ritesh.list@gmail.com \
--cc=rppt@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=surenb@google.com \
--cc=tglx@linutronix.de \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).