Skip to content

always lock the root anon_vma

Rik van Riel linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 34 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rename anon_vma_lock to vma_lock_anon_vmainclude/linux/rmap.h mm/mmap.c+9 -92 replies
1/5rename anon_vma_lock to vma_lock_anon_vmainclude/linux/rmap.h mm/mmap.c+9 -94 replies
2/5change direct call of spin_lock(anon_vma->lock) to inline functioninclude/linux/rmap.h mm/ksm.c mm/mmap.c +1 more+30 -202 replies
2/5change direct call of spin_lock(anon_vma->lock) to inline functioninclude/linux/rmap.h mm/ksm.c mm/migrate.c +2 more+32 -220 replies
3/5track the root (oldest) anon_vmainclude/linux/rmap.h mm/rmap.c+18 -35 replies
3/5track the root (oldest) anon_vmainclude/linux/rmap.h mm/rmap.c+17 -20 replies
4/5always lock the root (oldest) anon_vmainclude/linux/rmap.h mm/ksm.c mm/mmap.c+10 -66 replies
4/5always lock the root (oldest) anon_vmainclude/linux/rmap.h mm/ksm.c mm/mmap.c+20 -68 replies
4/5always lock the root (oldest) anon_vmainclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+28 -140 replies
5/5extend KSM refcounts to the anon_vma rootinclude/linux/rmap.h mm/ksm.c mm/rmap.c+62 -125 replies
5/5extend KSM refcounts to the anon_vma rootinclude/linux/rmap.h mm/ksm.c mm/rmap.c+62 -121 reply
5/5extend KSM refcounts to the anon_vma rootinclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+68 -190 replies

Reviews trailers per patch

6 of 12 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMel GormanKAMEZAWA HiroyukiRik van Riel
SeriesR-b
1/5A-b A-b
1/5A-b A-b
2/5A-b A-b
2/5A-b A-b
3/5A-b A-b
3/5A-b A-b
4/5
4/5
4/5
5/5
5/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/5] always lock the root anon_vma

This patch series implements Linus's suggestion of always locking the root anon_vma. Because the lock in other anon_vmas no longer protects anything at all, we cannot do the "lock dance" that Mel's earlier patches implements and instead need a root pointer in the anon_vma.

The only subtlety these patches rely on is that the same_vma list is ordered from new to old, with the root anon_vma at the very end.

This, together with the forward list walking in unlink_anon_vmas, ensures that the root anon_vma is the last one freed.

The KSM refcount adds some additional complexity, because an anon_vma can stick around after the processes it was attached to have already exited. Patch 5/5 deals with that issue.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>