[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1399648668-17420-1-git-send-email-nasa4836@gmail.com>
Date: Fri, 9 May 2014 23:17:48 +0800
From: Jianyu Zhan <nasa4836@...il.com>
To: akpm@...ux-foundation.org, hannes@...xchg.org, riel@...hat.com,
mhocko@...e.cz, aarcange@...hat.com, hanpt@...ux.vnet.ibm.com,
mgorman@...e.de, oleg@...hat.com, cldu@...vell.com, fabf@...net.be,
sasha.levin@...cle.com, zhangyanfei@...fujitsu.com
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
nasa4836@...il.com
Subject: [PATCH] mm: use a irq-safe __mod_zone_page_state in mlocked_vma_newpage()
mlocked_vma_newpage() is only called in fault path by
page_add_new_anon_rmap(), which is called on a *new* page.
And such page is initially only visible via the pagetables, and the
pte is locked while calling page_add_new_anon_rmap(), so we could use
a irq-safe version of __mod_zone_page_state() here.
Signed-off-by: Jianyu Zhan <nasa4836@...il.com>
---
mm/internal.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/internal.h b/mm/internal.h
index 07b6736..69079b1 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -196,7 +196,7 @@ static inline int mlocked_vma_newpage(struct vm_area_struct *vma,
return 0;
if (!TestSetPageMlocked(page)) {
- mod_zone_page_state(page_zone(page), NR_MLOCK,
+ __mod_zone_page_state(page_zone(page), NR_MLOCK,
hpage_nr_pages(page));
count_vm_event(UNEVICTABLE_PGMLOCKED);
}
--
2.0.0-rc1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists