lkml.org 
[lkml]   [2015]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86/mm/fault: Put pgd_lock in its own cacheline
Date
On a large system with many cores, massive creation or destruction
of processes/threads can sometime cause a fair amount of spinlock
contention in the pgd_lock used by the pgd_alloc() and pgd_free()
functions. This patch tries to reduce false cacheline sharing by
putting the pgd_lock in its own cacheline which help to reduce
contention on the lock.

Signed-off-by: Waiman Long <Waiman.Long@hp.com>
---
arch/x86/mm/fault.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 181c53b..fae48df 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -185,7 +185,7 @@ force_sig_info_fault(int si_signo, int si_code, unsigned long address,
force_sig_info(si_signo, &info, tsk);
}

-DEFINE_SPINLOCK(pgd_lock);
+__cacheline_aligned_in_smp DEFINE_SPINLOCK(pgd_lock);
LIST_HEAD(pgd_list);

#ifdef CONFIG_X86_32
--
1.7.1


\
 
 \ /
  Last update: 2015-06-10 15:41    [W:0.132 / U:1.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site