From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by kanga.kvack.org (Postfix) with ESMTP id EFB7E6B006C for ; Wed, 22 Oct 2014 23:07:02 -0400 (EDT) Received: by mail-ie0-f182.google.com with SMTP id rp18so177858iec.13 for ; Wed, 22 Oct 2014 20:07:02 -0700 (PDT) Received: from relay.sgi.com (relay3.sgi.com. [192.48.152.1]) by mx.google.com with ESMTP id q14si1022228ice.71.2014.10.22.20.07.01 for ; Wed, 22 Oct 2014 20:07:01 -0700 (PDT) From: Alex Thorlton Subject: [PATCH 1/2] Add pgcollapse stat counter to task_struct Date: Wed, 22 Oct 2014 22:06:25 -0500 Message-Id: <1414033586-185593-1-git-send-email-athorlton@sgi.com> In-Reply-To: <1414032567-109765-1-git-send-email-athorlton@sgi.com> References: <1414032567-109765-1-git-send-email-athorlton@sgi.com> Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org Cc: Alex Thorlton , Andrew Morton , Bob Liu , David Rientjes , "Eric W . Biederman" , Hugh Dickins , Ingo Molnar , Kees Cook , "Kirill A . Shutemov" , Mel Gorman , Oleg Nesterov , Peter Zijlstra , Rik van Riel , Thomas Gleixner , Vladimir Davydov , linux-kernel@vger.kernel.org Pretty self explanatory. Just adding one of the same counters that I used to gather data for the other patches. Cc: Andrew Morton Cc: Bob Liu Cc: David Rientjes Cc: Eric W. Biederman Cc: Hugh Dickins Cc: Ingo Molnar Cc: Kees Cook Cc: Kirill A. Shutemov Cc: Mel Gorman Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Rik van Riel Cc: Thomas Gleixner Cc: Vladimir Davydov Cc: linux-kernel@vger.kernel.org --- include/linux/sched.h | 3 +++ mm/huge_memory.c | 1 + 2 files changed, 4 insertions(+) diff --git a/include/linux/sched.h b/include/linux/sched.h index 5e344bb..9b87d9a 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1661,6 +1661,9 @@ struct task_struct { unsigned int sequential_io; unsigned int sequential_io_avg; #endif +#ifdef CONFIG_TRANSPARENT_HUGEPAGE + unsigned int pgcollapse_pages_collapsed; +#endif }; /* Future-safe accessor for struct task_struct's cpus_allowed. */ diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 74c78aa..ca8a813 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2531,6 +2531,7 @@ static void collapse_huge_page(struct mm_struct *mm, *hpage = NULL; + mm->owner->pgcollapse_pages_collapsed++; khugepaged_pages_collapsed++; out_up_write: up_write(&mm->mmap_sem); -- 1.7.12.4 -- 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