From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673Ab3EUUys (ORCPT ); Tue, 21 May 2013 16:54:48 -0400 Received: from www.sr71.net ([198.145.64.142]:45129 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750766Ab3EUUyr (ORCPT ); Tue, 21 May 2013 16:54:47 -0400 Message-ID: <519BDF15.4080301@sr71.net> Date: Tue, 21 May 2013 13:54:45 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: "Kirill A. Shutemov" CC: Andrea Arcangeli , Andrew Morton , Al Viro , Hugh Dickins , Wu Fengguang , Jan Kara , Mel Gorman , linux-mm@kvack.org, Andi Kleen , Matthew Wilcox , "Kirill A. Shutemov" , Hillf Danton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv4 18/39] thp, mm: add event counters for huge page alloc on write to a file References: <1368321816-17719-1-git-send-email-kirill.shutemov@linux.intel.com> <1368321816-17719-19-git-send-email-kirill.shutemov@linux.intel.com> In-Reply-To: <1368321816-17719-19-git-send-email-kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/11/2013 06:23 PM, Kirill A. Shutemov wrote: > diff --git a/include/linux/vm_event_item.h b/include/linux/vm_event_item.h > index d4b7a18..584c71c 100644 > --- a/include/linux/vm_event_item.h > +++ b/include/linux/vm_event_item.h > @@ -71,6 +71,8 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, > THP_FAULT_FALLBACK, > THP_COLLAPSE_ALLOC, > THP_COLLAPSE_ALLOC_FAILED, > + THP_WRITE_ALLOC, > + THP_WRITE_ALLOC_FAILED, > THP_SPLIT, > THP_ZERO_PAGE_ALLOC, > THP_ZERO_PAGE_ALLOC_FAILED, > diff --git a/mm/vmstat.c b/mm/vmstat.c > index 7945285..df8dcda 100644 > --- a/mm/vmstat.c > +++ b/mm/vmstat.c > @@ -821,6 +821,8 @@ const char * const vmstat_text[] = { > "thp_fault_fallback", > "thp_collapse_alloc", > "thp_collapse_alloc_failed", > + "thp_write_alloc", > + "thp_write_alloc_failed", > "thp_split", > "thp_zero_page_alloc", > "thp_zero_page_alloc_failed", I guess these new counters are _consistent_ with all the others. But, why do we need a separate "_failed" for each one of these? While I'm nitpicking, does "thp_write_alloc" mean allocs or _successful_ allocs? I had to look at the code to tell. I thihk it's probably safe to combine this patch with the next one. Breaking them apart just makes it harder to review. If _anything_, this, plus the use of the counters should go in to a different patch from the true code changes in "mm: allocate huge pages in grab_cache_page_write_begin()".