From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx113.postini.com [74.125.245.113]) by kanga.kvack.org (Postfix) with SMTP id 208CF6B0070 for ; Wed, 3 Oct 2012 17:10:45 -0400 (EDT) Received: by padfa10 with SMTP id fa10so7894579pad.14 for ; Wed, 03 Oct 2012 14:10:44 -0700 (PDT) Date: Wed, 3 Oct 2012 14:10:41 -0700 (PDT) From: David Rientjes Subject: [patch -mm] mm, thp: fix mlock statistics fix In-Reply-To: <20121003131012.f88b0d66.akpm@linux-foundation.org> Message-ID: References: <20121003131012.f88b0d66.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Hugh Dickins , Linus Torvalds , Andrea Arcangeli , Naoya Horiguchi , KAMEZAWA Hiroyuki , Johannes Weiner , Michel Lespinasse , linux-kernel@vger.kernel.org, linux-mm@kvack.org On Wed, 3 Oct 2012, Andrew Morton wrote: > The free_page_mlock() hunk gets dropped because free_page_mlock() is > removed. And clear_page_mlock() doesn't need this treatment. But > please check my handiwork. > I reviewed what was merged into -mm and clear_page_mlock() does need this fix as well. It's an easy fix, there's no need to pass "anon" into clear_page_mlock() since PageHuge() is already checked in its only caller. mm, thp: fix mlock statistics fix Signed-off-by: David Rientjes --- mm/mlock.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/mm/mlock.c b/mm/mlock.c --- a/mm/mlock.c +++ b/mm/mlock.c @@ -56,7 +56,8 @@ void clear_page_mlock(struct page *page) if (!TestClearPageMlocked(page)) return; - dec_zone_page_state(page, NR_MLOCK); + mod_zone_page_state(page_zone(page), NR_MLOCK, + -hpage_nr_pages(page)); count_vm_event(UNEVICTABLE_PGCLEARED); if (!isolate_lru_page(page)) { putback_lru_page(page); -- 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: email@kvack.org