From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751762Ab2HMLNz (ORCPT ); Mon, 13 Aug 2012 07:13:55 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:57917 "EHLO e28smtp07.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751497Ab2HMLNy (ORCPT ); Mon, 13 Aug 2012 07:13:54 -0400 Message-ID: <5028E14C.7060905@linux.vnet.ibm.com> Date: Mon, 13 Aug 2012 19:13:16 +0800 From: Xiao Guangrong User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Xiao Guangrong CC: Andrew Morton , Andrea Arcangeli , Hugh Dickins , David Rientjes , LKML , Linux Memory Management List Subject: [PATCH 01/12] thp: fix the count of THP_COLLAPSE_ALLOC References: <5028E12C.70101@linux.vnet.ibm.com> In-Reply-To: <5028E12C.70101@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit x-cbid: 12081311-8878-0000-0000-00000397F172 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org THP_COLLAPSE_ALLOC is double counted if NUMA is disabled since it has already been calculated in khugepaged_alloc_hugepage Signed-off-by: Xiao Guangrong --- mm/huge_memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 57c4b93..80bcd42 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1880,9 +1880,9 @@ static void collapse_huge_page(struct mm_struct *mm, *hpage = ERR_PTR(-ENOMEM); return; } + count_vm_event(THP_COLLAPSE_ALLOC); #endif - count_vm_event(THP_COLLAPSE_ALLOC); if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) { #ifdef CONFIG_NUMA put_page(new_page); -- 1.7.7.6