From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755774Ab2JCVKq (ORCPT ); Wed, 3 Oct 2012 17:10:46 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:43577 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755158Ab2JCVKo (ORCPT ); Wed, 3 Oct 2012 17:10:44 -0400 Date: Wed, 3 Oct 2012 14:10:41 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com 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 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> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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);