From: Michal Hocko <mhocko@kernel.org>
To: Minchan Kim <minchan@kernel.org>
Cc: akpm@linux-foundation.org, ebru.akagunduz@gmail.com,
aarcange@redhat.com, aneesh.kumar@linux.vnet.ibm.com,
boaz@plexistor.com, gorcunov@openvz.org, hannes@cmpxchg.org,
hughd@google.com, iamjoonsoo.kim@lge.com,
kirill.shutemov@linux.intel.com, mgorman@suse.de,
n-horiguchi@ah.jp.nec.com, riel@redhat.com, rientjes@google.com,
vbabka@suse.cz, mm-commits@vger.kernel.org, linux-mm@kvack.org
Subject: Re: + mm-thp-avoid-unnecessary-swapin-in-khugepaged.patch added to -mm tree
Date: Fri, 20 May 2016 08:39:17 +0200 [thread overview]
Message-ID: <20160520063917.GC19172@dhcp22.suse.cz> (raw)
In-Reply-To: <20160520002155.GA2224@bbox>
On Fri 20-05-16 09:21:55, Minchan Kim wrote:
[...]
> I think other important thing we should consider is how the THP page is likely
> to be hot without split in a short time like KSM is doing double checking to
> merge stable page. Of course, it wouldn't be easyI to implement but I think
> algorithm is based on such *hotness* basically and then consider the number
> of max_swap_ptes. IOW, I think we should approach more conservative rather
> than optimistic because a page I/O overhead by wrong choice could be bigger
> than benefit of a few TLB hit.
> If we approach that way, maybe we don't need to detect memory pressure.
>
> For that way, how about raising bar for swapin allowance?
> I mean now we allows swapin
>
> from
> 64 pages below swap ptes and 1 page young in 512 ptes
> to
> 64 pages below swap ptes and 256 page young in 512 ptes
I agree that the current 1 page threshold for collapsing is way too
optimistic. Same as the defaults we had for the page fault THP faulting
which has caused many issues. So I would be all for changing it. I do
not have good benchmarks to back any "good" number unfortunately. So
such a change would be quite arbitrary based on feeling... If you have
some workload where collapsing THP pages causes some real issues that
would be great justification though.
That being said khugepaged_max_ptes_none = HPAGE_PMD_NR/2 sounds like a
good start to me. Whether all of the present pages have to be young I am
not so sure.
--
Michal Hocko
SUSE Labs
--
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>
next prev parent reply other threads:[~2016-05-20 6:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <57212c60.fUSE244UFwhXE+az%akpm@linux-foundation.org>
2016-04-28 15:19 ` + mm-thp-avoid-unnecessary-swapin-in-khugepaged.patch added to -mm tree Michal Hocko
2016-05-17 7:58 ` Michal Hocko
2016-05-17 9:02 ` Michal Hocko
2016-05-17 11:31 ` Kirill A. Shutemov
2016-05-17 12:25 ` Michal Hocko
2016-05-19 5:00 ` Minchan Kim
2016-05-19 7:03 ` Michal Hocko
2016-05-19 7:27 ` Minchan Kim
2016-05-19 7:39 ` Michal Hocko
2016-05-20 0:21 ` Minchan Kim
2016-05-20 6:39 ` Michal Hocko [this message]
2016-05-20 7:26 ` Minchan Kim
2016-05-20 7:34 ` Michal Hocko
2016-05-20 7:44 ` Minchan Kim
2016-05-20 8:02 ` Michal Hocko
2016-05-20 8:26 ` Minchan Kim
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=20160520063917.GC19172@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=boaz@plexistor.com \
--cc=ebru.akagunduz@gmail.com \
--cc=gorcunov@openvz.org \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).