From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx205.postini.com [74.125.245.205]) by kanga.kvack.org (Postfix) with SMTP id 5B2716B0006 for ; Tue, 16 Apr 2013 11:11:29 -0400 (EDT) Message-ID: <516D6A1E.4060201@sr71.net> Date: Tue, 16 Apr 2013 08:11:26 -0700 From: Dave Hansen MIME-Version: 1.0 Subject: Re: [PATCHv3, RFC 09/34] thp: represent file thp pages in meminfo and friends References: <1365163198-29726-1-git-send-email-kirill.shutemov@linux.intel.com> <1365163198-29726-10-git-send-email-kirill.shutemov@linux.intel.com> <51631CC0.5010908@sr71.net> <20130416144917.8FEAEE0085@blue.fi.intel.com> In-Reply-To: <20130416144917.8FEAEE0085@blue.fi.intel.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: 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 On 04/16/2013 07:49 AM, Kirill A. Shutemov wrote: > Dave Hansen wrote: >> On 04/05/2013 04:59 AM, Kirill A. Shutemov wrote: >>> The patch adds new zone stat to count file transparent huge pages and >>> adjust related places. >>> >>> For now we don't count mapped or dirty file thp pages separately. >> >> I can understand tracking NR_FILE_TRANSPARENT_HUGEPAGES itself. But, >> why not also account for them in NR_FILE_PAGES? That way, you don't >> have to special-case each of the cases below: > > Good point. > To be consistent I'll also convert NR_ANON_TRANSPARENT_HUGEPAGES to be > accounted in NR_ANON_PAGES. Hmm... I didn't realize we did that for the anonymous version. But, looking at the meminfo code: > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > K(global_page_state(NR_ANON_PAGES) > + global_page_state(NR_ANON_TRANSPARENT_HUGEPAGES) * > HPAGE_PMD_NR), > #else > K(global_page_state(NR_ANON_PAGES)), > #endif That #ifdef and a couple others like it would just go away if we did this. It would be a nice cleanup. -- 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