Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423823

Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative

From Ebru Akagunduz <ebru.akagunduz@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative
Date 2016-06-16 11:10 +0200
Message-ID <rKBtf-6qC-3@gated-at.bofh.it> (permalink)
References <rIWBQ-723-5@gated-at.bofh.it> <rIWBQ-723-15@gated-at.bofh.it> <rKcOd-7sd-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jun 15, 2016 at 03:40:53PM +0900, Minchan Kim wrote:
> Hello,
> 
> On Sat, Jun 11, 2016 at 10:16:00PM +0300, Ebru Akagunduz wrote:
> > Currently, khugepaged collapses pages saying only
> > a referenced page enough to create a THP.
> > 
> > This patch changes the design from optimistic to conservative.
> > It gives a default threshold which is half of HPAGE_PMD_NR
> > for referenced pages, also introduces a new sysfs knob.
> 
> Strictly speaking, It's not what I suggested.
> 
> I didn't mean that let's change threshold for deciding whether we should
> collapse or not(although just *a* reference page seems be too
> optimistic) and export the knob to the user. In fact, I cannot judge
> whether it's worth or not because I never have an experience with THP
> workload in practice although I believe it does make sense.
> 
> What I suggested is that a swapin operation would be much heavier than
> a THP cost to collapse populated anon page so it should be more
> conservative than THP collasping decision, at least. Given that thought,
> decision point for collasping a THP is *a* reference page now so *half*
> reference of populated pages for reading swapped-out page is more
> conservative.
>
Then passing referenced parameter from khugepaged_scan_pmd to
collapse_huge_page_swapin seems okay. A referenced is enough to
create THP, if needs to swapin, we check the value that should
be higher than 256 and so that, we don't need a new sysfs knob.
 
> > 
> > Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
> > ---

> > +static unsigned int khugepaged_min_ptes_young __read_mostly;
> 
> We should set it to 1 to preserve old behavior.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 0/3] mm, thp: convert from optimistic to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-11 21:20 +0200
  [RFC PATCH 1/3] mm, thp: revert allocstall comparing Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-11 21:20 +0200
    Re: [RFC PATCH 1/3] mm, thp: revert allocstall comparing Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-13 20:40 +0200
    Re: [RFC PATCH 1/3] mm, thp: revert allocstall comparing Michal Hocko <mhocko@kernel.org> - 2016-06-14 09:10 +0200
  [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-11 21:20 +0200
    Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-13 20:40 +0200
    Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative Michal Hocko <mhocko@kernel.org> - 2016-06-14 09:20 +0200
    Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative Minchan Kim <minchan@kernel.org> - 2016-06-15 08:50 +0200
      Re: [RFC PATCH 2/3] mm, thp: convert from optimistic to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-16 11:10 +0200
  Re: [RFC PATCH 0/3] mm, thp: convert from optimistic to conservative Ebru Akagunduz <ebru.akagunduz@gmail.com> - 2016-06-13 20:40 +0200

csiph-web