Skip to content

mm: preemptibility -v3

Peter Zijlstra linux-arch lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest28 patches 19 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/28powerpc: Use call_rcu_sched() for pagetablesarch/powerpc/mm/pgtable.c+1 -10 replies
2/28mm: Improve page_lock_anon_vma() commentmm/rmap.c+16 -21 reply
3/28rename anon_vma_lock to vma_lock_anon_vmainclude/linux/rmap.h mm/mmap.c+8 -82 replies
4/28change direct call of spin_lock(anon_vma->lock) to inline functioninclude/linux/rmap.h mm/ksm.c mm/migrate.c +2 more+31 -210 replies
5/28track the root (oldest) anon_vmainclude/linux/rmap.h mm/rmap.c+17 -20 replies
6/28always lock the root (oldest) anon_vmainclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+28 -140 replies
7/28extend KSM refcounts to the anon_vma rootinclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+68 -191 reply
8/28mm: Rename drop_anon_vma to put_anon_vmainclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+10 -100 replies
9/28mm: Move anon_vma ref out from under CONFIG_KSMinclude/linux/rmap.h mm/rmap.c+8 -421 reply
10/28mm: Make use of the anon_vma ref countinclude/linux/rmap.h mm/ksm.c mm/rmap.c+52 -572 replies
11/28mm: Preemptible mmu_gatherfs/exec.c include/asm-generic/tlb.h include/linux/mm.h +2 more+53 -530 replies
12/28powerpc: Preemptible mmu_gatherarch/powerpc/include/asm/pgalloc.h arch/powerpc/include/asm/thread_info.h arch/powerpc/include/asm/tlb.h +5 more+46 -190 replies
13/28sparc: Preemptible mmu_gatherarch/sparc/include/asm/pgalloc_64.h arch/sparc/include/asm/tlb_64.h arch/sparc/include/asm/tlbflush_64.h +2 more+51 -1120 replies
14/28s390: preemptible mmu_gatherarch/s390/include/asm/tlb.h+25 -180 replies
15/28arm: Preemptible mmu_gatherarch/arm/include/asm/tlb.h+2 -100 replies
16/28sh: Preemptible mmu_gatherarch/sh/include/asm/tlb.h+2 -101 reply
17/28um: Preemptible mmu_gatherarch/um/include/asm/tlb.h+2 -140 replies
18/28ia64: Preemptible mmu_gatherarch/ia64/include/asm/tlb.h+25 -130 replies
19/28mm, powerpc: Move the RCU page-table freeing into generic codearch/powerpc/include/asm/pgalloc.h arch/powerpc/include/asm/tlb.h arch/powerpc/mm/pgtable.c +5 more+150 -1260 replies
20/28sparc64: Kill page table quicklists.arch/sparc/Kconfig arch/sparc/include/asm/pgalloc_64.h arch/sparc/mm/tsb.c+26 -210 replies
21/28sparc64: Use RCU page table freeing.arch/sparc/include/asm/pgalloc_64.h+47 -20 replies
22/28sparc64: Add support for _PAGE_SPECIALarch/sparc/include/asm/pgtable_64.h+11 -40 replies
23/28sparc64: Implement get_user_pages_fast().arch/sparc/mm/Makefile arch/sparc/mm/gup.c+182 -10 replies
24/28lockdep, mutex: Provide mutex_lock_nest_lockinclude/linux/lockdep.h include/linux/mutex.h kernel/mutex.c+29 -80 replies
25/28mutex: Provide mutex_is_contendedinclude/linux/mutex.h+5 -00 replies
26/28mm: Convert i_mmap_lock and anon_vma->lock to mutexesarch/x86/mm/hugetlbpage.c fs/gfs2/main.c fs/hugetlbfs/inode.c +14 more+58 -580 replies
27/28mm: Extended batches for generic mmu_gatherinclude/asm-generic/tlb.h+82 -400 replies
28/28mm: Optimize page_lock_anon_vma() fast-pathmm/rmap.c+61 -40 replies

Reviews trailers per patch

6 of 28 patches have a Reviewed-by or Acked-by.

PatchMel GormanKAMEZAWA HiroyukiDavid MillerNick PigginKOSAKI Motohiro
1/28
2/28A-b R-b
3/28A-b A-b
4/28A-b A-b
5/28A-b A-b
6/28
7/28A-b
8/28
9/28A-b
10/28
11/28
12/28
13/28
14/28
15/28
16/28
17/28
18/28
19/28Requested-by
20/28
21/28
22/28
23/28
24/28
25/28
26/28
27/28Requested-by
28/28

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

Read the v1 thread

Cover letter [PATCH 00/28] mm: preemptibility -v3

This patch-set makes part of the mm a lot more preemptible. It converts i_mmap_lock and anon_vma->lock to mutexes and makes mmu_gather fully preemptible.

The main motivation was making mm_take_all_locks() preemptible, since it appears people are nesting hundreds of spinlocks there.

The side-effects are that can finally make mmu_gather preemptible, something which lots of people have wanted to do for a long time.

It also gets us anon_vma refcounting, which seems to result in a nice cleanup of the anon_vma lifetime rules wrt KSM and compaction.

This patch-set it build and boot-tested on x86_64 (a previous version was also tested on Dave's Niagra2 machines, and I suppose s390 did too when Martin provided the conversion patch for his arch).

There are no known architectures left unconverted, although some arch code never did see a compiler (superh and um come to mind).

Can we move this work forwards, or is there anything people would want to see done?

[ The series includes Rik's latest patches to the same area for convenience ]