diff options
author | Konstantin Khlebnikov <khlebnikov@openvz.org> | 2012-10-08 19:28:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:16 -0400 |
commit | cc2383ec06be093789469852e1fe96e1148e9a2c (patch) | |
tree | ea65c486104507000cdc5c2957015f2895dda7a2 /mm/ksm.c | |
parent | b3b9c2932c32e0692018ed5f12f3fd8c70eea8ce (diff) |
mm: introduce arch-specific vma flag VM_ARCH_1
Combine several arch-specific vma flags into one.
before patch:
0x00000200 0x01000000 0x20000000 0x40000000
x86 VM_NOHUGEPAGE VM_HUGEPAGE - VM_PAT
powerpc - - VM_SAO -
parisc VM_GROWSUP - - -
ia64 VM_GROWSUP - - -
nommu - VM_MAPPED_COPY - -
others - - - -
after patch:
0x00000200 0x01000000 0x20000000 0x40000000
x86 - VM_PAT VM_HUGEPAGE VM_NOHUGEPAGE
powerpc - VM_SAO - -
parisc - VM_GROWSUP - -
ia64 - VM_GROWSUP - -
nommu - VM_MAPPED_COPY - -
others - VM_ARCH_1 - -
And voila! One completely free bit.
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Venkatesh Pallipadi <venki@google.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r-- | mm/ksm.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1470,9 +1470,14 @@ int ksm_madvise(struct vm_area_struct *vma, unsigned long start, | |||
1470 | if (*vm_flags & (VM_MERGEABLE | VM_SHARED | VM_MAYSHARE | | 1470 | if (*vm_flags & (VM_MERGEABLE | VM_SHARED | VM_MAYSHARE | |
1471 | VM_PFNMAP | VM_IO | VM_DONTEXPAND | | 1471 | VM_PFNMAP | VM_IO | VM_DONTEXPAND | |
1472 | VM_RESERVED | VM_HUGETLB | VM_INSERTPAGE | | 1472 | VM_RESERVED | VM_HUGETLB | VM_INSERTPAGE | |
1473 | VM_NONLINEAR | VM_MIXEDMAP | VM_SAO)) | 1473 | VM_NONLINEAR | VM_MIXEDMAP)) |
1474 | return 0; /* just ignore the advice */ | 1474 | return 0; /* just ignore the advice */ |
1475 | 1475 | ||
1476 | #ifdef VM_SAO | ||
1477 | if (*vm_flags & VM_SAO) | ||
1478 | return 0; | ||
1479 | #endif | ||
1480 | |||
1476 | if (!test_bit(MMF_VM_MERGEABLE, &mm->flags)) { | 1481 | if (!test_bit(MMF_VM_MERGEABLE, &mm->flags)) { |
1477 | err = __ksm_enter(mm); | 1482 | err = __ksm_enter(mm); |
1478 | if (err) | 1483 | if (err) |