summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-report
diff options
context:
space:
mode:
authorLonglong Xia <xialonglong@kylinos.cn>2026-08-05 21:27:34 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-08-24 18:43:02 -0700
commit3c37cac718fa407b6656d925c4437ed5410fcdda (patch)
tree1ac6bbc5c38a3d8f2657c6f8a789b5664f0edaf2 /tools/perf/scripts/python/bin/stackcollapse-report
parent2bee308f3adbd09aa7f6b01fd2271de36538973c (diff)
mm/ksm: avoid missing ksmd wakeups in ksm_enter
__ksm_enter() decides whether ksmd needs a wakeup by checking if the mm slot list is empty before inserting the new slot. The empty check is currently outside ksm_mmlist_lock. Another CPU can remove the last slot and let ksmd go back to sleep after the unlocked check, while this CPU inserts a new slot and skips the wakeup based on the stale result. Take ksm_mmlist_lock before checking the list so the empty-to-nonempty transition and the insertion are observed as one critical section. Link: https://lore.kernel.org/20260805132736.1063408-1-xialonglong2025@163.com Fixes: 6e15838425ac ("ksm: keep quiet while list empty") Signed-off-by: Longlong Xia <xialonglong@kylinos.cn> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Chengming Zhou <chengming.zhou@linux.dev> Cc: Izik Eidus <ieidus@redhat.com> Cc: xu xin <xu.xin16@zte.com.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions