diff options
| author | xu xin <xu.xin16@zte.com.cn> | 2026-02-12 14:29:32 +0300 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-04-05 23:52:35 +0300 |
| commit | 318d87b8fa733bebdc9c803657671df0b7b8b006 (patch) | |
| tree | 0d05da15c0cee980031bfceb0de3a32486a4ba23 /include/linux/stackprotector.h | |
| parent | 34ca46cc6fc954782f859f0fc66e8fe9ce2c24f0 (diff) | |
| download | linux-318d87b8fa733bebdc9c803657671df0b7b8b006.tar.xz | |
ksm: initialize the addr only once in rmap_walk_ksm
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.
Link: https://lkml.kernel.org/r/20260212192820223O_r2NQzSEPG_C56cs-z4l@zte.com.cn
Link: https://lkml.kernel.org/r/20260212192932941MSsJEAyoRW4YdLBN7_myn@zte.com.cn
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Hugh Dickins <hughd@google.com>
Cc: Wang Yaxin <wang.yaxin@zte.com.cn>
Cc: Yang Yang <yang.yang29@zte.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
