Linux CXL
 help / color / mirror / Atom feed
From: Ankur Arora <ankur.a.arora@oracle.com>
To: "David Hildenbrand (Red Hat)" <david@kernel.org>
Cc: dan.j.williams@intel.com,
	Jonathan Cameron <jonathan.cameron@huawei.com>,
	Li Zhe <lizhe.67@bytedance.com>,
	akpm@linux-foundation.org, ankur.a.arora@oracle.com,
	fvdl@google.com, joao.m.martins@oracle.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	mhocko@suse.com, mjguzik@gmail.com, muchun.song@linux.dev,
	osalvador@suse.de, raghavendra.kt@amd.com,
	linux-cxl@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
	Gregory Price <gourry@gourry.net>,
	zhanjie9@hisilicon.com, wangzhou1@hisilicon.com
Subject: Re: [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism
Date: Thu, 15 Jan 2026 14:30:44 -0800	[thread overview]
Message-ID: <87wm1ih5kb.fsf@oracle.com> (raw)
In-Reply-To: <65cdc2fa-b6ba-4422-9537-feb7d3a33210@kernel.org>


David Hildenbrand (Red Hat) <david@kernel.org> writes:

> On 1/15/26 21:16, dan.j.williams@intel.com wrote:
>> David Hildenbrand (Red Hat) wrote:
>> [..]
>>>> Give me a list of 1Gig pages and this stuff becomes much more efficient
>>>> than anything the CPU can do.
>>>
>>> Right, and ideally we'd implement any such mechanisms in a way that more
>>> parts of the kernel can benefit, and not just an unloved in-memory
>>> file-system that most people just want to get rid of as soon as we can :)
>> CPUs have tended to eat the value of simple DMA offload operations like
>> copy/zero over time.
>> In the case of this patch there is no async-offload benefit because
>> userspace is already charged with spawning more threads if it wants more
>> parallelism.
>
> In this subthread we're discussing handling that in the kernel like
> init_on_free. So when user space frees a hugetlb folio (or in the 
> future, other similarly gigantic folios from another allocator), we'd be zeroing
> it.
>
> If it would be freeing multiple such folios, we could pack them and send them to
> a DMA engine to zero them for us (concurrently? asynchronously? I don't know :)
> )

I've been thinking about using non-temporal instructions (movnt/clzero)
for zeroing in that path.

Both the DMA engine and non-temporal zeroing would also improve things
because we won't be bringing free buffers to the cache while zeroing.

-- 
ankur

  reply	other threads:[~2026-01-15 22:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9daa39e6-9653-45cc-8c00-abf5f3bae974@kernel.org>
     [not found] ` <20260115093641.44404-1-lizhe.67@bytedance.com>
     [not found]   ` <83798495-915b-4a5d-9638-f5b3de913b71@kernel.org>
2026-01-15 11:57     ` [PATCH v2 0/8] Introduce a huge-page pre-zeroing mechanism Jonathan Cameron
2026-01-15 17:08       ` David Hildenbrand (Red Hat)
2026-01-15 20:16         ` dan.j.williams
2026-01-15 20:22           ` David Hildenbrand (Red Hat)
2026-01-15 22:30             ` Ankur Arora [this message]
2026-01-20  6:27               ` Li Zhe
2026-01-20  9:47                 ` David Laight
2026-01-20 10:39                   ` Li Zhe
2026-01-20 18:18                     ` Gregory Price
2026-01-20 18:38                       ` Gregory Price
2026-01-20 19:30                       ` David Laight
2026-01-20 19:52                         ` Gregory Price
2026-01-21  8:03                       ` Li Zhe
2026-01-21 12:41                       ` David Hildenbrand (Red Hat)
2026-01-21 12:32                   ` David Hildenbrand (Red Hat)

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=87wm1ih5kb.fsf@oracle.com \
    --to=ankur.a.arora@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave@stgolabs.net \
    --cc=david@kernel.org \
    --cc=fvdl@google.com \
    --cc=gourry@gourry.net \
    --cc=joao.m.martins@oracle.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizhe.67@bytedance.com \
    --cc=mhocko@suse.com \
    --cc=mjguzik@gmail.com \
    --cc=muchun.song@linux.dev \
    --cc=osalvador@suse.de \
    --cc=raghavendra.kt@amd.com \
    --cc=wangzhou1@hisilicon.com \
    --cc=zhanjie9@hisilicon.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