linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Jianyu Zhan <nasa4836@gmail.com>
To: akpm@linux-foundation.org, hannes@cmpxchg.org, riel@redhat.com,
	mhocko@suse.cz, aarcange@redhat.com, hanpt@linux.vnet.ibm.com,
	mgorman@suse.de, oleg@redhat.com, cldu@marvell.com,
	fabf@skynet.be, sasha.levin@oracle.com,
	zhangyanfei@cn.fujitsu.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, nasa4836@gmail.com
Subject: [PATCH] mm: use a irq-safe __mod_zone_page_state in mlocked_vma_newpage()
Date: Fri,  9 May 2014 23:17:48 +0800	[thread overview]
Message-ID: <1399648668-17420-1-git-send-email-nasa4836@gmail.com> (raw)

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@gmail.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, 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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2014-05-09 15:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09 15:17 Jianyu Zhan [this message]
2014-05-09 15:56 ` [PATCH] mm: use a irq-safe __mod_zone_page_state in mlocked_vma_newpage() Christoph Lameter
  -- strict thread matches above, loose matches on Subject: below --
2014-05-09 16:16 Jianyu Zhan
2014-05-09 16:34 ` Christoph Lameter
2014-05-09 19:54 ` Andrew Morton
2014-05-12 13:57 ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399648668-17420-1-git-send-email-nasa4836@gmail.com \
    --to=nasa4836@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cldu@marvell.com \
    --cc=fabf@skynet.be \
    --cc=hannes@cmpxchg.org \
    --cc=hanpt@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=oleg@redhat.com \
    --cc=riel@redhat.com \
    --cc=sasha.levin@oracle.com \
    --cc=zhangyanfei@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).