From: David Hildenbrand <david@redhat.com>
To: Pankaj Raghav <p.raghav@samsung.com>,
"Darrick J . Wong" <djwong@kernel.org>,
hch@lst.de, willy@infradead.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-fsdevel@vger.kernel.org, mcgrof@kernel.org,
gost.dev@samsung.com, Andrew Morton <akpm@linux-foundation.org>,
kernel@pankajraghav.com
Subject: Re: [RFC 1/3] mm: add large zero page for efficient zeroing of larger segments
Date: Fri, 16 May 2025 14:21:04 +0200 [thread overview]
Message-ID: <cb52312d-348b-49d5-b0d7-0613fb38a558@redhat.com> (raw)
In-Reply-To: <20250516101054.676046-2-p.raghav@samsung.com>
On 16.05.25 12:10, Pankaj Raghav wrote:
> Introduce LARGE_ZERO_PAGE of size 2M as an alternative to ZERO_PAGE of
> size PAGE_SIZE.
>
> There are many places in the kernel where we need to zeroout larger
> chunks but the maximum segment we can zeroout at a time is limited by
> PAGE_SIZE.
>
> This is especially annoying in block devices and filesystems where we
> attach multiple ZERO_PAGEs to the bio in different bvecs. With multipage
> bvec support in block layer, it is much more efficient to send out
> larger zero pages as a part of single bvec.
>
> While there are other options such as huge_zero_page, they can fail
> based on the system memory pressure requiring a fallback to ZERO_PAGE[3].
Instead of adding another one, why not have a config option that will
always allocate the huge zeropage, and never free it?
I mean, the whole thing about dynamically allocating/freeing it was for
memory-constrained systems. For large systems, we just don't care.
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2025-05-16 12:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 10:10 [RFC 0/3] add large zero page for zeroing out " Pankaj Raghav
2025-05-16 10:10 ` [RFC 1/3] mm: add large zero page for efficient zeroing of " Pankaj Raghav
2025-05-16 12:21 ` David Hildenbrand [this message]
2025-05-16 13:03 ` Pankaj Raghav (Samsung)
2025-05-16 14:54 ` David Hildenbrand
2025-05-16 10:10 ` [RFC 2/3] block: use LARGE_ZERO_PAGE in __blkdev_issue_zero_pages() Pankaj Raghav
2025-05-16 10:10 ` [RFC 3/3] iomap: use LARGE_ZERO_PAGE in iomap_dio_zero() Pankaj Raghav
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=cb52312d-348b-49d5-b0d7-0613fb38a558@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=kernel@pankajraghav.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mcgrof@kernel.org \
--cc=p.raghav@samsung.com \
--cc=willy@infradead.org \
/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