Skip to content

rmap: Fix Bugzilla Bug #5493

Christian Ehrhardt linux-mm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rmap: Fix Bugzilla Bug #5493arch/arm/mm/fault-armv.c arch/arm/mm/flush.c arch/parisc/kernel/cache.c +16 more+154 -1250 replies
2/2rmap: Fix Bugzilla Bug #5493include/linux/rmap.h lib/prio_tree.c mm/ksm.c +3 more+130 -620 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/2] rmap: Fix Bugzilla Bug #5493

Hi,

this set of two patches fixes Bugzilla Bug #5493.

      http://bugzilla.kernel.org/show_bug.cgi?id=5493

The first patch makes the vma prio tree code reusable. This patch should not contain any functional changes.

The second patch uses the prio tree code for the vmas associated with an anon_vma. This allows us to replace the linear searches in rmap.c with prio tree iterations that are much more efficient if there are many vmas associated with an anon_vma.

The runtime of the test program in the bug report reduces from half an hour to about two minutes on the VBox instance used for testing.

The patch is against a current vanilla kernel that already includes the vma linking patches from Rik.

Diffstat for both patches combined:

 arch/arm/mm/fault-armv.c   |    3 +-
 arch/arm/mm/flush.c        |    3 +-
 arch/parisc/kernel/cache.c |    3 +-
 arch/x86/mm/hugetlbpage.c  |    3 +-
 fs/hugetlbfs/inode.c       |    3 +-
 fs/inode.c                 |    2 +-
 include/linux/mm.h         |   32 ++++++++--
 include/linux/mm_types.h   |   10 +---
 include/linux/prio_tree.h  |   17 +++++-
 include/linux/rmap.h       |   88 +++++++++++++++++---------
 kernel/fork.c              |    2 +-
 lib/prio_tree.c            |   14 +++-
 mm/filemap_xip.c           |    3 +-
 mm/fremap.c                |    2 +-
 mm/hugetlb.c               |    3 +-
 mm/ksm.c                   |   25 ++++++--
 mm/memory-failure.c        |    9 ++-
 mm/memory.c                |    5 +-
 mm/mmap.c                  |   43 ++++++++-----
 mm/nommu.c                 |   12 ++--
 mm/prio_tree.c             |  148 +++++++++++++++++++++-----------------------
 mm/rmap.c                  |   41 ++++++++----
 22 files changed, 284 insertions(+), 187 deletions(-)

regards Christian

--
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>