From: Vlastimil Babka <vbabka@suse.cz>
To: Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Ebru Akagunduz <ebru.akagunduz@gmail.com>,
linux-mm@kvack.org, kirill@shutemov.name, mhocko@suse.cz,
mgorman@suse.de, rientjes@google.com, sasha.levin@oracle.com,
hughd@google.com, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, aarcange@redhat.com,
keithr@alum.mit.edu, dvyukov@google.com
Subject: Re: [PATCH v2] mm: incorporate zero pages into transparent huge pages
Date: Mon, 23 Feb 2015 22:45:21 +0100 [thread overview]
Message-ID: <54EB9F71.3040004@suse.cz> (raw)
In-Reply-To: <54EB82D0.9080606@redhat.com>
On 23.2.2015 20:43, Rik van Riel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/23/2015 02:16 PM, Andrew Morton wrote:
>> On Wed, 18 Feb 2015 19:08:12 -0500 Rik van Riel <riel@redhat.com>
>> wrote:
>>>> If so, this might be rather undesirable behaviour in some
>>>> situations (and ditto the current behaviour for pte_none
>>>> ptes)?
>>>>
>>>> This can be tuned by adjusting khugepaged_max_ptes_none,
>> Here's a live one:
>> https://bugzilla.kernel.org/show_bug.cgi?id=93111
>>
>> Application does MADV_DONTNEED to free up a load of memory and
>> then khugepaged comes along and pages that memory back in again.
>> It seems a bit silly to do this after userspace has deliberately
>> discarded those pages!
OK that's a nice example how a more conservative default for
max_ptes_none would make sense even with the current aggressive
THP faulting.
>> Presumably MADV_NOHUGEPAGE can be used to prevent this, but it's a
>> bit of a hand-grenade. I guess the MADV_DONTNEED manpage should be
>> updated to explain all this?
Probably, together with the tunable documentation. Seems like we
didn't add enough details to madvise manpage in the recent round :)
> That makes me wonder what a good value for khugepaged_max_ptes_none
> would be.
>
> Doubling the amount of memory a program uses seems quite unreasonable.
>
> Increasing the amount of memory a program uses by 512x seems totally
> unreasonable.
>
> Increasing the amount of memory a program uses by 20% might be
> reasonable, if that much memory is available, since that seems to
> be about how much performance improvement we have ever seen from
> THP.
>
> Andrew, Andrea, do you have any ideas on this?
>
> Is this something to just set, or should we ask Ebru to run
> a few different tests with this?
If there is a good test for this, sure.
--
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: Rik van Riel <riel@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Ebru Akagunduz <ebru.akagunduz@gmail.com>,
linux-mm@kvack.org, kirill@shutemov.name, mhocko@suse.cz,
mgorman@suse.de, rientjes@google.com, sasha.levin@oracle.com,
hughd@google.com, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, aarcange@redhat.com,
keithr@alum.mit.edu, dvyukov@google.com
Subject: Re: [PATCH v2] mm: incorporate zero pages into transparent huge pages
Date: Mon, 23 Feb 2015 22:45:21 +0100 [thread overview]
Message-ID: <54EB9F71.3040004@suse.cz> (raw)
In-Reply-To: <54EB82D0.9080606@redhat.com>
On 23.2.2015 20:43, Rik van Riel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 02/23/2015 02:16 PM, Andrew Morton wrote:
>> On Wed, 18 Feb 2015 19:08:12 -0500 Rik van Riel <riel@redhat.com>
>> wrote:
>>>> If so, this might be rather undesirable behaviour in some
>>>> situations (and ditto the current behaviour for pte_none
>>>> ptes)?
>>>>
>>>> This can be tuned by adjusting khugepaged_max_ptes_none,
>> Here's a live one:
>> https://bugzilla.kernel.org/show_bug.cgi?id=93111
>>
>> Application does MADV_DONTNEED to free up a load of memory and
>> then khugepaged comes along and pages that memory back in again.
>> It seems a bit silly to do this after userspace has deliberately
>> discarded those pages!
OK that's a nice example how a more conservative default for
max_ptes_none would make sense even with the current aggressive
THP faulting.
>> Presumably MADV_NOHUGEPAGE can be used to prevent this, but it's a
>> bit of a hand-grenade. I guess the MADV_DONTNEED manpage should be
>> updated to explain all this?
Probably, together with the tunable documentation. Seems like we
didn't add enough details to madvise manpage in the recent round :)
> That makes me wonder what a good value for khugepaged_max_ptes_none
> would be.
>
> Doubling the amount of memory a program uses seems quite unreasonable.
>
> Increasing the amount of memory a program uses by 512x seems totally
> unreasonable.
>
> Increasing the amount of memory a program uses by 20% might be
> reasonable, if that much memory is available, since that seems to
> be about how much performance improvement we have ever seen from
> THP.
>
> Andrew, Andrea, do you have any ideas on this?
>
> Is this something to just set, or should we ask Ebru to run
> a few different tests with this?
If there is a good test for this, sure.
next prev parent reply other threads:[~2015-02-23 21:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 21:03 [PATCH v2] mm: incorporate zero pages into transparent huge pages Ebru Akagunduz
2015-02-11 21:03 ` Ebru Akagunduz
2015-02-11 22:16 ` Andrea Arcangeli
2015-02-11 22:16 ` Andrea Arcangeli
2015-02-11 22:21 ` Kirill A. Shutemov
2015-02-11 22:21 ` Kirill A. Shutemov
2015-02-11 22:33 ` Andrea Arcangeli
2015-02-11 22:33 ` Andrea Arcangeli
2015-02-16 11:50 ` Vlastimil Babka
2015-02-16 11:50 ` Vlastimil Babka
2015-02-18 23:31 ` Andrew Morton
2015-02-18 23:31 ` Andrew Morton
2015-02-19 0:08 ` Rik van Riel
2015-02-19 0:08 ` Rik van Riel
2015-02-19 8:25 ` Vlastimil Babka
2015-02-19 8:25 ` Vlastimil Babka
2015-02-23 19:16 ` Andrew Morton
2015-02-23 19:16 ` Andrew Morton
2015-02-23 19:43 ` Rik van Riel
2015-02-23 19:43 ` Rik van Riel
2015-02-23 21:45 ` Vlastimil Babka [this message]
2015-02-23 21:45 ` Vlastimil Babka
2015-02-20 18:02 ` Andrea Arcangeli
2015-02-20 18:02 ` Andrea Arcangeli
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=54EB9F71.3040004@suse.cz \
--to=vbabka@suse.cz \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dvyukov@google.com \
--cc=ebru.akagunduz@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=keithr@alum.mit.edu \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=sasha.levin@oracle.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.