Skip to content

mm: preemptibility

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mm: Move anon_vma ref out from under CONFIG_KSMinclude/linux/rmap.h mm/ksm.c mm/rmap.c+5 -270 replies
2/7mm: Make use of the anon_vma ref countinclude/linux/rmap.h mm/ksm.c mm/migrate.c +1 more+43 -330 replies
3/7mm: Preemptible mmu_gatherfs/exec.c include/asm-generic/tlb.h include/linux/mm.h +2 more+53 -530 replies
4/7lockdep, mutex: Provide mutex_lock_nest_lockinclude/linux/lockdep.h include/linux/mutex.h kernel/mutex.c+29 -80 replies
5/7mutex: Provide mutex_is_contendedinclude/linux/mutex.h+5 -00 replies
6/7mm: Convert i_mmap_lock and anon_vma->lock to mutexesarch/x86/mm/hugetlbpage.c fs/hugetlbfs/inode.c fs/inode.c +13 more+74 -740 replies
7/7mm: Optimize page_lock_anon_vmamm/rmap.c+61 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] mm: preemptibility

Hi,

This (incomplete) patch-set makes part of the mm a lot more preemptible. It converts i_mmap_lock and anon_vma->lock to mutexes.
On the way there it also makes mmu_gather 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 we 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 be wanted by KSM as well as Mel's compaction work.

This patch set seems to build and boot on my x86_64 machine and even builds a kernel. I'll work on getting PPC working again and audit other architectures their mmu_gather implementation.