linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/8xx: Build fix with Hugetlbfs enabled
@ 2018-04-10  8:51 Aneesh Kumar K.V
  2018-04-11 14:49 ` Michael Ellerman
  0 siblings, 1 reply; 6+ messages in thread
From: Aneesh Kumar K.V @ 2018-04-10  8:51 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, Aneesh Kumar K.V, Christophe LEROY

8xx use slice code when hugetlbfs is enabled. We missed a header include on
8xx which resulted in the below build failure.

config: mpc885_ads_defconfig + CONFIG_HUGETLBFS

   CC      arch/powerpc/mm/slice.o
arch/powerpc/mm/slice.c: In function 'slice_get_unmapped_area':
arch/powerpc/mm/slice.c:655:2: error: implicit declaration of function 'need_extra_context' [-Werror=implicit-function-declaration]
arch/powerpc/mm/slice.c:656:3: error: implicit declaration of function 'alloc_extended_context' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
make[1]: *** [arch/powerpc/mm/slice.o] Error 1
make: *** [arch/powerpc/mm] Error 2

on PPC64 the mmu_context.h was included via linux/pkeys.h

CC: Christophe LEROY <christophe.leroy@c-s.fr>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 arch/powerpc/mm/slice.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c
index 9cd87d11fe4e..205fe557ca10 100644
--- a/arch/powerpc/mm/slice.c
+++ b/arch/powerpc/mm/slice.c
@@ -35,6 +35,7 @@
 #include <asm/mmu.h>
 #include <asm/copro.h>
 #include <asm/hugetlb.h>
+#include <asm/mmu_context.h>
 
 static DEFINE_SPINLOCK(slice_convert_lock);
 
-- 
2.14.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH V1 00/11] powerpc/mm/book3s64: Support for split pmd ptlock
@ 2018-04-16 11:27 Aneesh Kumar K.V
  2018-04-16 11:27 ` [PATCH] powerpc/8xx: Build fix with Hugetlbfs enabled Aneesh Kumar K.V
  0 siblings, 1 reply; 6+ messages in thread
From: Aneesh Kumar K.V @ 2018-04-16 11:27 UTC (permalink / raw)
  To: benh, paulus, mpe; +Cc: linuxppc-dev, Aneesh Kumar K.V

This patch series add split pmd pagetable lock for book3s64. nohash64 also should
be able to switch to this. I need to workout the code dependency. This series
also migh have broken the build on platforms otherthan book3s64. I am sending this early
to get feedback on whether we should continue with the approach.

We switch the pmd allocator to use something similar to what we already use for
level 4 pagetable allocation. We get an order 0 page and divide that to fragments
and hand over fragments when we get request for a pmd pagetable. The pmd lock is
now stashed in the struct page backing the allocated page.

The series helps in reducing lock contention on mm->page_table_lock.


without patch

    32.72%  mmap_bench  [kernel.vmlinux]            [k] do_raw_spin_lock
            |
            ---do_raw_spin_lock
               |
                --32.68%--0
                          |
                          |--15.82%--pte_fragment_alloc
                          |          |
                          |           --15.79%--do_huge_pmd_anonymous_page
                          |                     __handle_mm_fault
                          |                     handle_mm_fault
                          |                     __do_page_fault
                          |                     handle_page_fault
                          |                     test_mmap
                          |                     test_mmap
                          |                     start_thread
                          |                     __clone
                          |
                          |--14.95%--do_huge_pmd_anonymous_page
                          |          __handle_mm_fault
                          |          handle_mm_fault
                          |          __do_page_fault
                          |          handle_page_fault
                          |          test_mmap
                          |          test_mmap
                          |          start_thread
                          |          __clone
                          |

with patch

    12.89%  mmap_bench  [kernel.vmlinux]            [k] do_raw_spin_lock
            |
            ---do_raw_spin_lock
               |
                --12.83%--0
                          |
                          |--3.21%--pagevec_lru_move_fn
                          |          __lru_cache_add
                          |          |
                          |           --2.74%--do_huge_pmd_anonymous_page
                          |                     __handle_mm_fault
                          |                     handle_mm_fault
                          |                     __do_page_fault
                          |                     handle_page_fault
                          |                     test_mmap
                          |                     test_mmap
                          |                     start_thread
                          |                     __clone
                          |
                          |--3.11%--do_huge_pmd_anonymous_page
                          |          __handle_mm_fault
                          |          handle_mm_fault
                          |          __do_page_fault
                          |          handle_page_fault
                          |          test_mmap
                          |          test_mmap
                          |          start_thread
                          |          __clone

.....
                          |
                           --0.55%--pte_fragment_alloc
                                     |
                                      --0.55%--do_huge_pmd_anonymous_page
                                                __handle_mm_fault
                                                handle_mm_fault
                                                __do_page_fault
                                                handle_page_fault
                                                test_mmap
                                                test_mmap
                                                start_thread
                                                __clone



Aneesh Kumar K.V (11):
  powerpc/mm/book3s64: Move book3s64 code to pgtable-book3s64
  powerpc/kvm: Switch kvm pmd allocator to custom allocator
  powerpc/mm: Use pmd_lockptr instead of opencoding it
  powerpc/mm: Rename pte fragment functions
  powerpc/mm/book3e/64: Remove unsupported 64Kpage size from 64bit booke
  powerpc/mm/nohash: Remove pte fragment dependency from nohash
  powerpc/mm/book3s64/4k: Switch 4k pagesize config to use pagetable
    fragment
  powerpc/book3s64/mm: Simplify the rcu callback for page table free
  powerpc/mm: Implement helpers for pagetable fragment support at PMD
    level
  powerpc/mm: Use page fragments for allocation page table at PMD level
  powerpc/book3s64: Enable split pmd ptlock.

 arch/powerpc/include/asm/book3s/64/hash-4k.h     |   8 +-
 arch/powerpc/include/asm/book3s/64/hash-64k.h    |   7 +
 arch/powerpc/include/asm/book3s/64/hash.h        |  10 -
 arch/powerpc/include/asm/book3s/64/mmu.h         |   7 +-
 arch/powerpc/include/asm/book3s/64/pgalloc.h     |  46 +---
 arch/powerpc/include/asm/book3s/64/pgtable.h     |  20 +-
 arch/powerpc/include/asm/book3s/64/radix-4k.h    |   3 +
 arch/powerpc/include/asm/book3s/64/radix-64k.h   |   4 +
 arch/powerpc/include/asm/mmu-book3e.h            |   6 -
 arch/powerpc/include/asm/nohash/64/pgalloc.h     |  95 +++-----
 arch/powerpc/include/asm/nohash/64/pgtable-64k.h |  57 -----
 arch/powerpc/include/asm/nohash/64/pgtable.h     |   8 +-
 arch/powerpc/kvm/book3s_64_mmu_radix.c           |  36 ++-
 arch/powerpc/mm/hash_utils_64.c                  |   3 +-
 arch/powerpc/mm/mmu_context_book3s64.c           |  39 +++-
 arch/powerpc/mm/pgtable-book3s64.c               | 267 ++++++++++++++++++++++-
 arch/powerpc/mm/pgtable-hash64.c                 |   8 +-
 arch/powerpc/mm/pgtable-radix.c                  |   5 +-
 arch/powerpc/mm/pgtable_64.c                     | 171 ---------------
 arch/powerpc/platforms/Kconfig.cputype           |   4 +
 20 files changed, 427 insertions(+), 377 deletions(-)
 delete mode 100644 arch/powerpc/include/asm/nohash/64/pgtable-64k.h

-- 
2.14.3

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-30  5:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10  8:51 [PATCH] powerpc/8xx: Build fix with Hugetlbfs enabled Aneesh Kumar K.V
2018-04-11 14:49 ` Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2018-04-16 11:27 [PATCH V1 00/11] powerpc/mm/book3s64: Support for split pmd ptlock Aneesh Kumar K.V
2018-04-16 11:27 ` [PATCH] powerpc/8xx: Build fix with Hugetlbfs enabled Aneesh Kumar K.V
2018-04-17 12:48   ` Christophe LEROY
2018-04-18  5:42   ` Michael Ellerman
2018-04-30  5:33     ` Aneesh Kumar K.V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).