summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorxu xin <xu.xin16@zte.com.cn>2026-07-09 17:32:12 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-08-04 19:18:46 -0700
commit887311e5cd67566a21ac8c70b9545bcc449714a8 (patch)
tree6c841f4d172de0738655faaf4c357106bf6daec4 /tools/perf/scripts/python/bin
parentef79e0f5e31b870025f209101363655feb6f8e67 (diff)
mm/ksm: initialize the addr only once in collect_procs_ksm
Patch series "KSM: use linear_page_index in collect_procs_ksm()", v2. In collect_procs_ksm() which is used to collect processes when the error hit an ksm page, there is the same issue with rmap_walk_ksm (see the previous discussion at [1]). So we apply the similar logic changes to the collect_procs_ksm(). The patch [1/2] move the initializaion of addr from the position inside loop to the position before the loop, since the variable will not change in the loop. The patch [2/2] optimize collect_procs_ksm by passing a suitable page offset range to the anon_vma_interval_tree_foreach loop to reduce ineffective checks. This patch (of 2): Similar to 318d87b8fa7 ("ksm: initialize the addr only once in rmap_walk_ksm"), only initialize the addr once in rmap_walk_ksm because the addr variable doesn't change across iterations. Link: https://lore.kernel.org/20260709173212190rZdwynySRyLr9EtPuXBRU@zte.com.cn Link: https://lore.kernel.org/all/20260703162253688u8Str9eFLR8TGCmo7nIOF@zte.com.cn/ [1] 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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions