Skip to content

mm: Preemptibility -v7

Peter Zijlstra linux-arch linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest25 patches 25 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25tile: Fix __pte_free_tlbarch/tile/mm/pgtable.c+2 -133 replies
2/25mm: Preemptible mmu_gatherfs/exec.c include/asm-generic/tlb.h include/linux/mm.h +2 more+54 -540 replies
3/25powerpc: Preemptible mmu_gatherarch/powerpc/include/asm/pgalloc.h arch/powerpc/include/asm/thread_info.h arch/powerpc/include/asm/tlb.h +5 more+49 -200 replies
4/25sparc: 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 -1121 reply
5/25s390: preemptible mmu_gatherarch/s390/include/asm/tlb.h+25 -180 replies
6/25arm: Preemptible mmu_gatherarch/arm/include/asm/tlb.h+2 -100 replies
7/25sh: Preemptible mmu_gatherarch/sh/include/asm/tlb.h+2 -100 replies
8/25um: Preemptible mmu_gatherarch/um/include/asm/tlb.h+2 -140 replies
9/25ia64: Preemptible mmu_gatherarch/ia64/include/asm/tlb.h+25 -164 replies
10/25mm: Now that all old mmu_gather code is gone, remove the storagearch/alpha/mm/init.c arch/arm/mm/mmu.c arch/avr32/mm/init.c +17 more+0 -390 replies
11/25mm, powerpc: Move the RCU page-table freeing into generic codearch/Kconfig arch/powerpc/Kconfig arch/powerpc/include/asm/pgalloc.h +7 more+151 -1250 replies
12/25lockdep, mutex: Provide mutex_lock_nest_lockinclude/linux/lockdep.h include/linux/mutex.h kernel/mutex.c+29 -80 replies
13/25mutex: Provide mutex_is_contendedinclude/linux/mutex.h+5 -00 replies
14/25mm: Convert i_mmap_lock to a mutexDocumentation/lockstat.txt Documentation/vm/locking arch/x86/mm/hugetlbpage.c +17 more+70 -700 replies
15/25mm: Extended batches for generic mmu_gatherinclude/asm-generic/tlb.h+82 -400 replies
16/25mm: Revert page_lock_anon_vma() lock annotationinclude/linux/rmap.h mm/rmap.c+2 -170 replies
17/25mm: Improve page_lock_anon_vma() commentmm/rmap.c+16 -20 replies
18/25mm: Rename drop_anon_vma to put_anon_vmainclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+11 -240 replies
19/25mm: Move anon_vma ref out from under CONFIG_KSMinclude/linux/rmap.h mm/rmap.c+10 -440 replies
20/25mm: Simplify anon_vma refcountsinclude/linux/rmap.h mm/rmap.c+37 -533 replies
21/25mm: Use refcounts for page_lock_anon_vma()mm/migrate.c mm/rmap.c+31 -280 replies
22/25mm: Convert anon_vma->lock to a mutexinclude/linux/huge_mm.h include/linux/mmu_notifier.h include/linux/rmap.h +3 more+21 -253 replies
23/25mm: Optimize page_lock_anon_vma() fast-pathmm/rmap.c+78 -40 replies
24/25mm: Remove i_mmap_mutex lockbreakinclude/linux/fs.h include/linux/mm.h include/linux/mm_types.h +4 more+27 -1850 replies
25/25mm, arch: Ensure we never tlb_flush_mmu() from atomic contextarch/arm/include/asm/tlb.h arch/ia64/include/asm/tlb.h arch/s390/include/asm/tlb.h +4 more+99 -260 replies

Reviews trailers per patch

15 of 25 patches have a Reviewed-by or Acked-by.

PatchKAMEZAWA HiroyukiHugh DickinsDavid MillerNick PigginKOSAKI MotohiroMel GormanTony LuckChris Metcalf
1/25A-b
2/25R-b A-b
3/25
4/25A-b
5/25
6/25
7/25
8/25
9/25A-b
10/25
11/25Requested-by
12/25
13/25R-b
14/25A-b
15/25R-b A-b Requested-by
16/25A-b
17/25R-b A-b R-b A-b
18/25R-b A-b
19/25R-b A-b A-b
20/25R-b A-b
21/25R-b A-b R-b
22/25A-b R-b
23/25R-b
24/25
25/25

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

Read the v1 thread

Cover letter [PATCH 00/25] mm: Preemptibility -v7

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 is build and boot-tested on x86_64 (a previous version was also tested on Dave's Niagra2 machines, and I suppose s390 was too when Martin provided the conversion patch for his arch).

There are no known architectures left unconverted.

Yanmin ran the -v3 posting through the comprehensive Intel test farm and didn't find any regressions.

( Not included in this posting are the 4 Sparc64 patches that implement
gup_fast, those can be applied separately after this series gets anywhere. )

The full series (including the Sparc64 gup_fast bits) also available in -git form from (against something post .38-rc2):

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-mmu_preempt.git

Changes since -v6:

Suggested by Hugh:
- reordered the patches
- changed to GFP_NOWAIT | __GFP_NOWARN to allocate mmu_gather pages
- s/lock/mutex/ for the spinlock to mutex conversion
- removed all DEFINE_PER_CPU(struct mmu_gather, mmu_gather) remnants
- split the i_mmap_lock and anon_vma->lock conversion
- removed some KSM wrappers
- avoid tlb_flush_mmu() while holding pte_lock

Other:
- remove the i_mmap_lock lockbreak in truncate (XXX)
- arch/tile __pte_free_tlb() change

TODO:
- decide if we want to actually remove the i_mmap_lock lockbreak
- figure out if LOCK vs MB works or add a smp_mb() to patch #23
- figure out what to do with sparc's tlb_batch lack of ->fullmm

--
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/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>