linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Salunke, Hrushikesh" <hsalunke@amd.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>, Zi Yan <ziy@nvidia.com>
Cc: <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: Wed, 22 Apr 2026 10:28:00 +0530	[thread overview]
Message-ID: <5b2f566e-7bdf-4a4a-a9c4-9d89f69fc7c0@amd.com> (raw)
In-Reply-To: <eb6a6dcc-9e48-47b2-9805-d14b121278ad@kernel.org>


On 21-04-2026 19:36, David Hildenbrand (Arm) wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> 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.

Thanks David and Zi Yan for the review.

That makes sense, moving KSAN handling into the helper function makes
it self-contained and cleaner. kernel_init_pages only has two call 
sites in page_alloc.c, so replacing it with direct calls to the helper
should be straightforward.

I will incorporate these changes in v3.

Regards,
Hrushikesh.



      reply	other threads:[~2026-04-22  4:58 UTC|newest]

Thread overview: 7+ 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)
2026-04-22  4:58         ` Salunke, Hrushikesh [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=5b2f566e-7bdf-4a4a-a9c4-9d89f69fc7c0@amd.com \
    --to=hsalunke@amd.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=ankur.a.arora@oracle.com \
    --cc=bharata@amd.com \
    --cc=david@kernel.org \
    --cc=hannes@cmpxchg.org \
    --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