* [PATCH] pagemap: fix order of pmd_trans_unstable() and pmd_trans_huge_lock()
@ 2012-03-29 8:41 Naoya Horiguchi
2012-03-29 20:25 ` Andrea Arcangeli
0 siblings, 1 reply; 3+ messages in thread
From: Naoya Horiguchi @ 2012-03-29 8:41 UTC (permalink / raw)
To: Andrew Morton
Cc: Sasha Levin, Andrea Arcangeli, Hugh Dickins, Naoya Horiguchi,
linux-kernel, linux-mm
pmd_trans_unstable() in pagemap_pte_range() comes before pmd_trans_huge_lock()
now, which means that pagewalk kicked by reading /proc/pid/pagemap does not
run over thp. This patch fixes it.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
---
fs/proc/task_mmu.c | 6 +++---
1 files changed, 3 insertions(+), 3 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 06d2b70..0105ba1 100644
--- linux-3.3.0-6658a6991ce.orig/fs/proc/task_mmu.c
+++ linux-3.3.0-6658a6991ce/fs/proc/task_mmu.c
@@ -781,9 +781,6 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
int err = 0;
pagemap_entry_t pme = make_pme(PM_NOT_PRESENT);
- if (pmd_trans_unstable(pmd))
- return 0;
-
/* find the first VMA at or above 'addr' */
vma = find_vma(walk->mm, addr);
if (pmd_trans_huge_lock(pmd, vma) == 1) {
@@ -801,6 +798,9 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
return err;
}
+ if (pmd_trans_unstable(pmd))
+ return 0;
+
for (; addr != end; addr += PAGE_SIZE) {
/* check to see if we've left 'vma' behind
--
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 [flat|nested] 3+ messages in thread* Re: [PATCH] pagemap: fix order of pmd_trans_unstable() and pmd_trans_huge_lock()
2012-03-29 8:41 [PATCH] pagemap: fix order of pmd_trans_unstable() and pmd_trans_huge_lock() Naoya Horiguchi
@ 2012-03-29 20:25 ` Andrea Arcangeli
2012-03-29 22:53 ` Naoya Horiguchi
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Arcangeli @ 2012-03-29 20:25 UTC (permalink / raw)
To: Naoya Horiguchi
Cc: Andrew Morton, Sasha Levin, Hugh Dickins, linux-kernel, linux-mm
Hi,
On Thu, Mar 29, 2012 at 04:41:41AM -0400, Naoya Horiguchi wrote:
> pmd_trans_unstable() in pagemap_pte_range() comes before pmd_trans_huge_lock()
> now, which means that pagewalk kicked by reading /proc/pid/pagemap does not
> run over thp. This patch fixes it.
This should be fixed already.
--
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] 3+ messages in thread
* Re: [PATCH] pagemap: fix order of pmd_trans_unstable() and pmd_trans_huge_lock()
2012-03-29 20:25 ` Andrea Arcangeli
@ 2012-03-29 22:53 ` Naoya Horiguchi
0 siblings, 0 replies; 3+ messages in thread
From: Naoya Horiguchi @ 2012-03-29 22:53 UTC (permalink / raw)
To: Andrea Arcangeli
Cc: Andrew Morton, Sasha Levin, Hugh Dickins, linux-kernel, linux-mm
(3/29/2012 16:25), Andrea Arcangeli wrote:
> Hi,
>
> On Thu, Mar 29, 2012 at 04:41:41AM -0400, Naoya Horiguchi wrote:
>> pmd_trans_unstable() in pagemap_pte_range() comes before pmd_trans_huge_lock()
>> now, which means that pagewalk kicked by reading /proc/pid/pagemap does not
>> run over thp. This patch fixes it.
>
> This should be fixed already.
Oh, you're right. Thanks.
--
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] 3+ messages in thread
end of thread, other threads:[~2012-03-29 22:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-29 8:41 [PATCH] pagemap: fix order of pmd_trans_unstable() and pmd_trans_huge_lock() Naoya Horiguchi
2012-03-29 20:25 ` Andrea Arcangeli
2012-03-29 22:53 ` Naoya Horiguchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox