aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 17:30:45 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 19:32:14 -0500
commit57c1ffcefb5acb3c8b5f8436c325a6bdbd8e9c78 (patch)
tree2dc4008ef48c72673dd4a645e4a4f8e5c3ebb2c6 /include/linux
parente9bb18c7b95d4dcf8c7f0e14f920ca6f03109e75 (diff)
mm: rename USE_SPLIT_PTLOCKS to USE_SPLIT_PTE_PTLOCKS
We're going to introduce split page table lock for PMD level. Let's rename existing split ptlock for PTE level to avoid confusion. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Tested-by: Alex Thorlton <athorlton@sgi.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: "Eric W . Biederman" <ebiederm@xmission.com> Cc: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Dave Jones <davej@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Kees Cook <keescook@chromium.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Robin Holt <robinmholt@gmail.com> Cc: Sedat Dilek <sedat.dilek@gmail.com> Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h6
-rw-r--r--include/linux/mm_types.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 42a35d94b82c..dc3333d6c986 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1316,7 +1316,7 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
1316} 1316}
1317#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */ 1317#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
1318 1318
1319#if USE_SPLIT_PTLOCKS 1319#if USE_SPLIT_PTE_PTLOCKS
1320/* 1320/*
1321 * We tuck a spinlock to guard each pagetable page into its struct page, 1321 * We tuck a spinlock to guard each pagetable page into its struct page,
1322 * at page->private, with BUILD_BUG_ON to make sure that this will not 1322 * at page->private, with BUILD_BUG_ON to make sure that this will not
@@ -1329,14 +1329,14 @@ static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long a
1329} while (0) 1329} while (0)
1330#define pte_lock_deinit(page) ((page)->mapping = NULL) 1330#define pte_lock_deinit(page) ((page)->mapping = NULL)
1331#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));}) 1331#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));})
1332#else /* !USE_SPLIT_PTLOCKS */ 1332#else /* !USE_SPLIT_PTE_PTLOCKS */
1333/* 1333/*
1334 * We use mm->page_table_lock to guard all pagetable pages of the mm. 1334 * We use mm->page_table_lock to guard all pagetable pages of the mm.
1335 */ 1335 */
1336#define pte_lock_init(page) do {} while (0) 1336#define pte_lock_init(page) do {} while (0)
1337#define pte_lock_deinit(page) do {} while (0) 1337#define pte_lock_deinit(page) do {} while (0)
1338#define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;}) 1338#define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;})
1339#endif /* USE_SPLIT_PTLOCKS */ 1339#endif /* USE_SPLIT_PTE_PTLOCKS */
1340 1340
1341static inline void pgtable_page_ctor(struct page *page) 1341static inline void pgtable_page_ctor(struct page *page)
1342{ 1342{
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index a3198e5aaf4e..f1ff66dfa79e 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -23,7 +23,7 @@
23 23
24struct address_space; 24struct address_space;
25 25
26#define USE_SPLIT_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS) 26#define USE_SPLIT_PTE_PTLOCKS (NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS)
27 27
28/* 28/*
29 * Each physical page in the system has a struct page associated with 29 * Each physical page in the system has a struct page associated with
@@ -141,7 +141,7 @@ struct page {
141 * indicates order in the buddy 141 * indicates order in the buddy
142 * system if PG_buddy is set. 142 * system if PG_buddy is set.
143 */ 143 */
144#if USE_SPLIT_PTLOCKS 144#if USE_SPLIT_PTE_PTLOCKS
145 spinlock_t ptl; 145 spinlock_t ptl;
146#endif 146#endif
147 struct kmem_cache *slab_cache; /* SL[AU]B: Pointer to slab */ 147 struct kmem_cache *slab_cache; /* SL[AU]B: Pointer to slab */
@@ -309,14 +309,14 @@ enum {
309 NR_MM_COUNTERS 309 NR_MM_COUNTERS
310}; 310};
311 311
312#if USE_SPLIT_PTLOCKS && defined(CONFIG_MMU) 312#if USE_SPLIT_PTE_PTLOCKS && defined(CONFIG_MMU)
313#define SPLIT_RSS_COUNTING 313#define SPLIT_RSS_COUNTING
314/* per-thread cached information, */ 314/* per-thread cached information, */
315struct task_rss_stat { 315struct task_rss_stat {
316 int events; /* for synchronization threshold */ 316 int events; /* for synchronization threshold */
317 int count[NR_MM_COUNTERS]; 317 int count[NR_MM_COUNTERS];
318}; 318};
319#endif /* USE_SPLIT_PTLOCKS */ 319#endif /* USE_SPLIT_PTE_PTLOCKS */
320 320
321struct mm_rss_stat { 321struct mm_rss_stat {
322 atomic_long_t count[NR_MM_COUNTERS]; 322 atomic_long_t count[NR_MM_COUNTERS];