+ lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch added to -mm tree
To: peterz@xxxxxxxxxxxxx,kirill.shutemov@xxxxxxxxxxxxxxx,mingo@xxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 07 Nov 2013 14:01:04 -0800


The patch titled
     Subject: lockref: use BLOATED_SPINLOCKS to avoid explicit config dependencies
has been added to the -mm tree.  Its filename is
     lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Subject: lockref: use BLOATED_SPINLOCKS to avoid explicit config dependencies

Avoid the fragile Kconfig construct guestimating spinlock_t sizes; use a
friendly compile-time test to determine this.

[kirill.shutemov@xxxxxxxxxxxxxxx: drop CONFIG_CMPXCHG_LOCKREF]
Signed-off-by: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/lockref.h |    7 ++++++-
 lib/Kconfig             |    7 -------
 lib/lockref.c           |    2 +-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff -puN include/linux/lockref.h~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies include/linux/lockref.h
--- a/include/linux/lockref.h~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies
+++ a/include/linux/lockref.h
@@ -15,10 +15,15 @@
  */
 
 #include <linux/spinlock.h>
+#include <generated/bounds.h>
+
+#define USE_CMPXCHG_LOCKREF \
+	(IS_ENABLED(CONFIG_ARCH_USE_CMPXCHG_LOCKREF) && \
+	 IS_ENABLED(CONFIG_SMP) && !BLOATED_SPINLOCKS)
 
 struct lockref {
 	union {
-#ifdef CONFIG_CMPXCHG_LOCKREF
+#if USE_CMPXCHG_LOCKREF
 		aligned_u64 lock_count;
 #endif
 		struct {
diff -puN lib/Kconfig~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies lib/Kconfig
--- a/lib/Kconfig~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies
+++ a/lib/Kconfig
@@ -51,13 +51,6 @@ config PERCPU_RWSEM
 config ARCH_USE_CMPXCHG_LOCKREF
 	bool
 
-config CMPXCHG_LOCKREF
-	def_bool y if ARCH_USE_CMPXCHG_LOCKREF
-	depends on SMP
-	depends on !GENERIC_LOCKBREAK
-	depends on !DEBUG_SPINLOCK
-	depends on !DEBUG_LOCK_ALLOC
-
 config CRC_CCITT
 	tristate "CRC-CCITT functions"
 	help
diff -puN lib/lockref.c~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies lib/lockref.c
--- a/lib/lockref.c~lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies
+++ a/lib/lockref.c
@@ -1,7 +1,7 @@
 #include <linux/export.h>
 #include <linux/lockref.h>
 
-#ifdef CONFIG_CMPXCHG_LOCKREF
+#if USE_CMPXCHG_LOCKREF
 
 /*
  * Allow weakly-ordered memory architectures to provide barrier-less
_

Patches currently in -mm which might be from peterz@xxxxxxxxxxxxx are

checkpatch-make-the-memory-barrier-test-noisier.patch
linux-next.patch
mm-avoid-increase-sizeofstruct-page-due-to-split-page-table-lock.patch
mm-rename-use_split_ptlocks-to-use_split_pte_ptlocks.patch
mm-convert-mm-nr_ptes-to-atomic_long_t.patch
mm-introduce-api-for-split-page-table-lock-for-pmd-level.patch
mm-thp-change-pmd_trans_huge_lock-to-return-taken-lock.patch
mm-thp-move-ptl-taking-inside-page_check_address_pmd.patch
mm-thp-do-not-access-mm-pmd_huge_pte-directly.patch
mm-hugetlb-convert-hugetlbfs-to-use-split-pmd-lock.patch
mm-convert-the-rest-to-new-page-table-lock-api.patch
mm-implement-split-page-table-lock-for-pmd-level.patch
x86-mm-enable-split-page-table-lock-for-pmd-level.patch
x86-add-missed-pgtable_pmd_page_ctor-dtor-calls-for-preallocated-pmds.patch
mm-dynamically-allocate-page-ptl-if-it-cannot-be-embedded-to-struct-page.patch
mm-properly-separate-the-bloated-ptl-from-the-regular-case.patch
mm-create-a-separate-slab-for-page-ptl-allocation.patch
lockref-use-bloated_spinlocks-to-avoid-explicit-config-dependencies.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux