All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hugetlb: Do not account hugetlb pages as NR_FILE_PAGES
Date: Mon, 25 May 2015 17:24:28 +0200	[thread overview]
Message-ID: <55633EAC.8060702@suse.cz> (raw)
In-Reply-To: <20150522143558.GA2462@suse.de>

On 05/22/2015 04:35 PM, Mel Gorman wrote:
>> 
>> Thanks!
>> 
>> > This makes a lot of sense to me.  The only thing I worry about is the
>> > proliferation of PageHuge(), a function call, in relatively hot paths.
>> 
>> I've tried that (see the patch below) but it enlarged the code by almost
>> 1k
>>    text    data     bss     dec     hex filename
>>  510323   74273   44440  629036   9992c mm/built-in.o.before
>>  511248   74273   44440  629961   99cc9 mm/built-in.o.after
>> 
>> I am not sure the code size increase is worth it. Maybe we can reduce
>> the check to only PageCompound(page) as huge pages are no in the page
>> cache (yet).
>> 
> 
> That would be a more sensible route because it also avoids exposing the
> hugetlbfs destructor unnecessarily.

You could maybe do test such as (PageCompound(page) && PageHuge(page)) to
short-circuit the call while remaining future-proof.

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz>
To: Mel Gorman <mgorman@suse.de>, Michal Hocko <mhocko@suse.cz>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] hugetlb: Do not account hugetlb pages as NR_FILE_PAGES
Date: Mon, 25 May 2015 17:24:28 +0200	[thread overview]
Message-ID: <55633EAC.8060702@suse.cz> (raw)
In-Reply-To: <20150522143558.GA2462@suse.de>

On 05/22/2015 04:35 PM, Mel Gorman wrote:
>> 
>> Thanks!
>> 
>> > This makes a lot of sense to me.  The only thing I worry about is the
>> > proliferation of PageHuge(), a function call, in relatively hot paths.
>> 
>> I've tried that (see the patch below) but it enlarged the code by almost
>> 1k
>>    text    data     bss     dec     hex filename
>>  510323   74273   44440  629036   9992c mm/built-in.o.before
>>  511248   74273   44440  629961   99cc9 mm/built-in.o.after
>> 
>> I am not sure the code size increase is worth it. Maybe we can reduce
>> the check to only PageCompound(page) as huge pages are no in the page
>> cache (yet).
>> 
> 
> That would be a more sensible route because it also avoids exposing the
> hugetlbfs destructor unnecessarily.

You could maybe do test such as (PageCompound(page) && PageHuge(page)) to
short-circuit the call while remaining future-proof.

  reply	other threads:[~2015-05-25 15:24 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 13:27 [PATCH] hugetlb: Do not account hugetlb pages as NR_FILE_PAGES Michal Hocko
2015-05-21 13:27 ` Michal Hocko
2015-05-21 13:52 ` Mel Gorman
2015-05-21 13:52   ` Mel Gorman
2015-05-21 16:18 ` Mike Kravetz
2015-05-21 16:18   ` Mike Kravetz
2015-05-22  6:01   ` Michal Hocko
2015-05-22  6:01     ` Michal Hocko
2015-05-21 17:09 ` Johannes Weiner
2015-05-21 17:09   ` Johannes Weiner
2015-05-22 14:21   ` Michal Hocko
2015-05-22 14:21     ` Michal Hocko
2015-05-22 14:28     ` Michal Hocko
2015-05-22 14:28       ` Michal Hocko
2015-05-22 14:35     ` Mel Gorman
2015-05-22 14:35       ` Mel Gorman
2015-05-25 15:24       ` Vlastimil Babka [this message]
2015-05-25 15:24         ` Vlastimil Babka
2015-06-02  9:25         ` Michal Hocko
2015-06-02  9:25           ` Michal Hocko
2015-06-02  9:33           ` Vlastimil Babka
2015-06-02  9:33             ` Vlastimil Babka
2015-06-02  9:38             ` Michal Hocko
2015-06-02  9:38               ` Michal Hocko
2015-06-02 10:00               ` Michal Hocko
2015-06-02 10:00                 ` Michal Hocko
2015-05-22  5:09 ` Naoya Horiguchi
2015-05-22  5:09   ` Naoya Horiguchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55633EAC.8060702@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=n-horiguchi@ah.jp.nec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.