linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Zi Yan <ziy@nvidia.com>
Cc: Hrushikesh Salunke <hsalunke@amd.com>,
	akpm@linux-foundation.org, ljs@kernel.org,
	Liam.Howlett@oracle.com, vbabka@kernel.org, rppt@kernel.org,
	surenb@google.com, mhocko@suse.com, jackmanb@google.com,
	hannes@cmpxchg.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, rkodsara@amd.com, bharata@amd.com,
	ankur.a.arora@oracle.com, shivankg@amd.com
Subject: Re: [PATCH v2] mm/page_alloc: use batch page clearing in kernel_init_pages()
Date: Tue, 21 Apr 2026 16:06:53 +0200	[thread overview]
Message-ID: <eb6a6dcc-9e48-47b2-9805-d14b121278ad@kernel.org> (raw)
In-Reply-To: <23A49388-EF68-4055-B620-54FD92FF2EC8@nvidia.com>

On 4/21/26 16:03, Zi Yan wrote:
> On 21 Apr 2026, at 9:57, David Hildenbrand (Arm) wrote:
> 
>> On 4/21/26 15:44, Zi Yan wrote:
>>>
>>>
>>> kasan_reset_tag() here removes the tag from page address, so that
>>> clear_pages() can use the right kaddr. I thought each page needs
>>> a kasan_reset_tag(). No need to respond here, as I am reading
>>> the code and trying to understand how it works.
>>
>> It's all confusing. But we really just turn the pointer into an untagged
>> pointer here, once.
> 
> Yes, I realized that after reading kasan_reset_tag() implementation.
> 
>>
>> So I think this is ok.
>>
>> I do wonder, though, whether we want to move the
>> kasan_disable_current/kasan_enable_current into the
>> clear_highpages_kasan_tagged().
> 
> This sounds reasonable to me. And also replace kernel_init_pages()
> with clear_highpages_kasan_tagged(), since kernel_init_pages()
> will be a wrapper then.

Agreed.

-- 
Cheers,

David


      reply	other threads:[~2026-04-21 14:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21  4:24 Hrushikesh Salunke
2026-04-21  9:27 ` Vlastimil Babka (SUSE)
2026-04-21 13:44 ` Zi Yan
2026-04-21 13:57   ` David Hildenbrand (Arm)
2026-04-21 14:03     ` Zi Yan
2026-04-21 14:06       ` David Hildenbrand (Arm) [this message]

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=eb6a6dcc-9e48-47b2-9805-d14b121278ad@kernel.org \
    --to=david@kernel.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=ankur.a.arora@oracle.com \
    --cc=bharata@amd.com \
    --cc=hannes@cmpxchg.org \
    --cc=hsalunke@amd.com \
    --cc=jackmanb@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mhocko@suse.com \
    --cc=rkodsara@amd.com \
    --cc=rppt@kernel.org \
    --cc=shivankg@amd.com \
    --cc=surenb@google.com \
    --cc=vbabka@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