linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Vinayak Menon <vinmenon@codeaurora.org>
Cc: hannes@cmpxchg.org, mgorman@techsingularity.net,
	linux-mm@kvack.org, akpm@linux-foundation.org, mhocko@suse.com,
	vbabka@suse.cz, sfr@canb.auug.org.au, pasha.tatashin@oracle.com,
	penguin-kernel@I-love.SAKURA.ne.jp, peter.enderborg@sony.com
Subject: Re: [PATCH] mm: fix low-high watermark distance on small systems
Date: Tue, 20 Mar 2018 20:29:05 +0900	[thread overview]
Message-ID: <20180320112905.GB210031@rodete-desktop-imager.corp.google.com> (raw)
In-Reply-To: <c1b84fef-0ad7-7380-9a6b-7cbc65abd68f@codeaurora.org>

On Tue, Mar 20, 2018 at 04:22:36PM +0530, Vinayak Menon wrote:
> >
> >> up few more times and doing shorter steals is better than kswapd stealing more in a single run. The latter
> >> does not better direct reclaims and causes thrashing too.
> >
> > That's the tradeoff of kswapd aggressiveness to avoid high rate
> > direct reclaim.
> 
> We can call it trade off only if increasing the aggressiveness of kswapd reduces the direct reclaims ?
> But as shown by the data I had shared, the aggressiveness does not improve direct reclaims. It is just causing
> unnecessary reclaim. i.e. a much lower low-high gap gives the same benefit on direct reclaims with far less
> reclaim.

Said again, it depends on workload. I can make simple test to break it easily.

> 
> >>> Don't get me wrong. I don't want you test all of wfs with varios
> >>> workload to prove your logic is better. What I want to say here is
> >>> it's heuristic so it couldn't be perfect for every workload so
> >>> if you change to non-linear, you could be better but others might be not.
> >> Yes I understand your point. But since mmtests and Android tests showed similar results, I thought the
> >> heuristic may just work across workloads. I assume from Johannes's tests on 140GB machine (from the
> >> commit msg of the patch which introduced wsf) that the current low-high gap works well without thrashing
> >> on bigger machines. This made me assume that the behavior is non-linear. So the non-linear behavior will
> >> not make any difference to higher RAM machines as the low-high remains almost same as shown in the table
> >> below. But I understand your point, for a different workload on smaller machines, I am not sure the benefit I
> >> see would be observed, though that's the same problem with current wsf too.
> > True. That's why I don't want to make it complicate. Later, if someone complains
> > "linear is better for his several testing", are you happy to rollback to it? 
> >
> > You might argue it's same problem now but at least as-is code is simple to
> > understand. 
> 
> Yes I agree that there can be workloads on low RAM that may see a side effect.  But since popular use case like those on Android

My concern is not side effect but putting more heuristic without proving
it's generally better.

I don't think repeated app launching on android doesn't reflect real user
scenario. Anyone don't do that in real life except some guys want to show
benchmark result in youtube.
About mmtests, what kinds of tests did you perform? So what's the result?
If you reduced thrashing, how much the test result is improved?
Every tests are improved? Need not vmstat but result from the benchmark.
Such wide testing would make more conviction.

> and also the mmtests shows the problem, and fixed by the patch, can we try to pick it and see if someone complains ? I see that
> there were other reports of this https://lkml.org/lkml/2017/11/24/167 . Do you suggest a tunable approach taken by the patch
> in that link ? So that varying use cases can be accommodated. I wanted to avoid a new tunable if some heuristic like the patch does
> just works.

Actually, I don't want to touch it unless we have more nice feedback
algorithm.

Anyway, it's just my opinion. I did best effort to explain. I will
defer to maintainer.

Thanks.

  reply	other threads:[~2018-03-20 11:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 10:34 Vinayak Menon
2018-03-15 14:34 ` Minchan Kim
2018-03-16 11:03   ` Vinayak Menon
2018-03-20 10:16     ` Minchan Kim
2018-03-20 10:52       ` Vinayak Menon
2018-03-20 11:29         ` Minchan Kim [this message]
2018-03-22 13:43           ` Vinayak Menon
2018-03-17  0:42 ` kbuild test robot
2018-03-17  1:40 ` kbuild test robot

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=20180320112905.GB210031@rodete-desktop-imager.corp.google.com \
    --to=minchan@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@suse.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=peter.enderborg@sony.com \
    --cc=sfr@canb.auug.org.au \
    --cc=vbabka@suse.cz \
    --cc=vinmenon@codeaurora.org \
    /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