From: "David Hildenbrand (Arm)" <david@kernel.org>
To: xu.xin16@zte.com.cn, akpm@linux-foundation.org
Cc: chengming.zhou@linux.dev, hughd@google.com,
wang.yaxin@zte.com.cn, yang.yang29@zte.com.cn,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ksm: Initialize the addr only once in rmap_walk_ksm
Date: Fri, 6 Feb 2026 11:46:42 +0100 [thread overview]
Message-ID: <ef853093-3007-49d9-aff2-fa39fef2b9b3@kernel.org> (raw)
In-Reply-To: <20260206175745201sbMJ9Ru8QZsjAo7YMopKS@zte.com.cn>
On 2/6/26 10:57, xu.xin16@zte.com.cn wrote:
> From: xu xin <xu.xin16@zte.com.cn>
>
> This is a minor performance optimization, especially when there are many
> for-loop iterations, because the addr variable doesn’t change across
> iterations.
>
> Therefore, it only needs to be initialized once before the loop.
>
> Signed-off-by: xu xin <xu.xin16@zte.com.cn>
> ---
Make sure to pick up any tags when resending! :)
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
--
Cheers,
David
next prev parent reply other threads:[~2026-02-06 10:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 9:56 [PATCH v2 0/2] KSM: Optimizations for rmap_walk_ksm xu.xin16
2026-02-06 9:57 ` [PATCH v2 1/2] ksm: Initialize the addr only once in rmap_walk_ksm xu.xin16
2026-02-06 10:46 ` David Hildenbrand (Arm) [this message]
2026-02-06 10:01 ` [PATCH v2 2/2] ksm: Optimize rmap_walk_ksm by passing a suitable address range xu.xin16
2026-02-06 11:01 ` David Hildenbrand (Arm)
2026-02-06 16:15 ` xu.xin16
2026-02-06 10:47 ` [PATCH v2 0/2] KSM: Optimizations for rmap_walk_ksm David Hildenbrand (Arm)
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=ef853093-3007-49d9-aff2-fa39fef2b9b3@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=chengming.zhou@linux.dev \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wang.yaxin@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
--cc=yang.yang29@zte.com.cn \
/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