All of lore.kernel.org
 help / color / mirror / Atom feed
* + mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch added to -mm tree
@ 2021-05-20  4:48 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2021-05-20  4:48 UTC (permalink / raw)
  To: anshuman.khandual, mm-commits, rdunlap, vbabka, willy


The patch titled
     Subject: mm/thp: make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS
has been added to the -mm tree.  Its filename is
     mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Anshuman Khandual <anshuman.khandual@arm.com>
Subject: mm/thp: make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS

Split ptlocks need not be defined and allocated unless they are being
used.  ALLOC_SPLIT_PTLOCKS is inherently dependent on
USE_SPLIT_PTE_PTLOCKS.  This just makes it explicit and clear.  While here
drop the spinlock_t element from the struct page when
USE_SPLIT_PTE_PTLOCKS is not enabled.

Link: https://lkml.kernel.org/r/1621409586-5555-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mm_types.h      |    2 ++
 include/linux/mm_types_task.h |    5 +++++
 mm/memory.c                   |    2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

--- a/include/linux/mm_types.h~mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks
+++ a/include/linux/mm_types.h
@@ -152,11 +152,13 @@ struct page {
 				struct mm_struct *pt_mm; /* x86 pgds only */
 				atomic_t pt_frag_refcount; /* powerpc */
 			};
+#if USE_SPLIT_PTE_PTLOCKS
 #if ALLOC_SPLIT_PTLOCKS
 			spinlock_t *ptl;
 #else
 			spinlock_t ptl;
 #endif
+#endif
 		};
 		struct {	/* ZONE_DEVICE pages */
 			/** @pgmap: Points to the hosting device page map. */
--- a/include/linux/mm_types_task.h~mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks
+++ a/include/linux/mm_types_task.h
@@ -22,7 +22,12 @@
 #define USE_SPLIT_PTE_PTLOCKS	(NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
 #define USE_SPLIT_PMD_PTLOCKS	(USE_SPLIT_PTE_PTLOCKS && \
 		IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
+
+#if USE_SPLIT_PTE_PTLOCKS
 #define ALLOC_SPLIT_PTLOCKS	(SPINLOCK_SIZE > BITS_PER_LONG/8)
+#else
+#define ALLOC_SPLIT_PTLOCKS	0
+#endif
 
 /*
  * The per task VMA cache array:
--- a/mm/memory.c~mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks
+++ a/mm/memory.c
@@ -5259,7 +5259,7 @@ long copy_huge_page_from_user(struct pag
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
 
-#if USE_SPLIT_PTE_PTLOCKS && ALLOC_SPLIT_PTLOCKS
+#if ALLOC_SPLIT_PTLOCKS
 
 static struct kmem_cache *page_ptl_cachep;
 
_

Patches currently in -mm which might be from anshuman.khandual@arm.com are

mm-thp-update-mm_structs-mm_anonpages-stat-for-huge-zero-pages.patch
mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch
mm-define-default-value-for-first_user_address.patch


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

* + mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch added to -mm tree
@ 2021-05-10  3:47 akpm
  0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2021-05-10  3:47 UTC (permalink / raw)
  To: anshuman.khandual, mm-commits


The patch titled
     Subject: mm/thp: make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS
has been added to the -mm tree.  Its filename is
     mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Anshuman Khandual <anshuman.khandual@arm.com>
Subject: mm/thp: make ALLOC_SPLIT_PTLOCKS dependent on USE_SPLIT_PTE_PTLOCKS

Split ptlocks need not be defined and allocated unless they are being
used.  ALLOC_SPLIT_PTLOCKS is inherently dependent on
USE_SPLIT_PTE_PTLOCKS.  This just makes it explicit and clear.

Link: https://lkml.kernel.org/r/1620618390-9999-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/mm_types_task.h |    5 +++++
 mm/memory.c                   |    2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

--- a/include/linux/mm_types_task.h~mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks
+++ a/include/linux/mm_types_task.h
@@ -22,7 +22,12 @@
 #define USE_SPLIT_PTE_PTLOCKS	(NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
 #define USE_SPLIT_PMD_PTLOCKS	(USE_SPLIT_PTE_PTLOCKS && \
 		IS_ENABLED(CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK))
+
+#if USE_SPLIT_PTE_PTLOCKS
 #define ALLOC_SPLIT_PTLOCKS	(SPINLOCK_SIZE > BITS_PER_LONG/8)
+#else
+#define ALLOC_SPLIT_PTLOCKS	0
+#endif
 
 /*
  * The per task VMA cache array:
--- a/mm/memory.c~mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks
+++ a/mm/memory.c
@@ -5260,7 +5260,7 @@ long copy_huge_page_from_user(struct pag
 }
 #endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
 
-#if USE_SPLIT_PTE_PTLOCKS && ALLOC_SPLIT_PTLOCKS
+#if ALLOC_SPLIT_PTLOCKS
 
 static struct kmem_cache *page_ptl_cachep;
 
_

Patches currently in -mm which might be from anshuman.khandual@arm.com are

mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch


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

end of thread, other threads:[~2021-05-20  4:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  4:48 + mm-thp-make-alloc_split_ptlocks-dependent-on-use_split_pte_ptlocks.patch added to -mm tree akpm
  -- strict thread matches above, loose matches on Subject: below --
2021-05-10  3:47 akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.