All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pagemap: remove remaining unneeded spin_lock()
@ 2012-03-29  8:39 ` Naoya Horiguchi
  0 siblings, 0 replies; 4+ messages in thread
From: Naoya Horiguchi @ 2012-03-29  8:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sasha Levin, Andrea Arcangeli, Hugh Dickins, Naoya Horiguchi,
	linux-kernel, linux-mm, stable

commit: 025c5b2451e4 "thp: optimize away unnecessary page table locking"
moves spin_lock() into pmd_trans_huge_lock() in order to avoid locking
unless pmd is for thp. So this spin_lock() is a bug.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: stable@vger.kernel.org
---
 fs/proc/task_mmu.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git linux-3.3.0-6658a6991ce.orig/fs/proc/task_mmu.c linux-3.3.0-6658a6991ce/fs/proc/task_mmu.c
index 9694cc2..06d2b70 100644
--- linux-3.3.0-6658a6991ce.orig/fs/proc/task_mmu.c
+++ linux-3.3.0-6658a6991ce/fs/proc/task_mmu.c
@@ -786,7 +786,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 
 	/* find the first VMA at or above 'addr' */
 	vma = find_vma(walk->mm, addr);
-	spin_lock(&walk->mm->page_table_lock);
 	if (pmd_trans_huge_lock(pmd, vma) == 1) {
 		for (; addr != end; addr += PAGE_SIZE) {
 			unsigned long offset;
-- 
1.7.7.6


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

* [PATCH] pagemap: remove remaining unneeded spin_lock()
@ 2012-03-29  8:39 ` Naoya Horiguchi
  0 siblings, 0 replies; 4+ messages in thread
From: Naoya Horiguchi @ 2012-03-29  8:39 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Sasha Levin, Andrea Arcangeli, Hugh Dickins, Naoya Horiguchi,
	linux-kernel, linux-mm, stable

commit: 025c5b2451e4 "thp: optimize away unnecessary page table locking"
moves spin_lock() into pmd_trans_huge_lock() in order to avoid locking
unless pmd is for thp. So this spin_lock() is a bug.

Reported-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: stable@vger.kernel.org
---
 fs/proc/task_mmu.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git linux-3.3.0-6658a6991ce.orig/fs/proc/task_mmu.c linux-3.3.0-6658a6991ce/fs/proc/task_mmu.c
index 9694cc2..06d2b70 100644
--- linux-3.3.0-6658a6991ce.orig/fs/proc/task_mmu.c
+++ linux-3.3.0-6658a6991ce/fs/proc/task_mmu.c
@@ -786,7 +786,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
 
 	/* find the first VMA at or above 'addr' */
 	vma = find_vma(walk->mm, addr);
-	spin_lock(&walk->mm->page_table_lock);
 	if (pmd_trans_huge_lock(pmd, vma) == 1) {
 		for (; addr != end; addr += PAGE_SIZE) {
 			unsigned long offset;
-- 
1.7.7.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] pagemap: remove remaining unneeded spin_lock()
  2012-03-29  8:39 ` Naoya Horiguchi
@ 2012-03-29 20:26   ` Andrea Arcangeli
  -1 siblings, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2012-03-29 20:26 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: Andrew Morton, Sasha Levin, Hugh Dickins, linux-kernel, linux-mm, stable

On Thu, Mar 29, 2012 at 04:39:39AM -0400, Naoya Horiguchi wrote:
> commit: 025c5b2451e4 "thp: optimize away unnecessary page table locking"
> moves spin_lock() into pmd_trans_huge_lock() in order to avoid locking
> unless pmd is for thp. So this spin_lock() is a bug.
> 
> Reported-by: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

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

* Re: [PATCH] pagemap: remove remaining unneeded spin_lock()
@ 2012-03-29 20:26   ` Andrea Arcangeli
  0 siblings, 0 replies; 4+ messages in thread
From: Andrea Arcangeli @ 2012-03-29 20:26 UTC (permalink / raw)
  To: Naoya Horiguchi
  Cc: Andrew Morton, Sasha Levin, Hugh Dickins, linux-kernel, linux-mm, stable

On Thu, Mar 29, 2012 at 04:39:39AM -0400, Naoya Horiguchi wrote:
> commit: 025c5b2451e4 "thp: optimize away unnecessary page table locking"
> moves spin_lock() into pmd_trans_huge_lock() in order to avoid locking
> unless pmd is for thp. So this spin_lock() is a bug.
> 
> Reported-by: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2012-03-29 20:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29  8:39 [PATCH] pagemap: remove remaining unneeded spin_lock() Naoya Horiguchi
2012-03-29  8:39 ` Naoya Horiguchi
2012-03-29 20:26 ` Andrea Arcangeli
2012-03-29 20:26   ` Andrea Arcangeli

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.