linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mgorman@suse.de>
To: Yaowei Bai <baiyaowei@cmss.chinamobile.com>
Cc: akpm@linux-foundation.org, riel@redhat.com, mhocko@suse.cz,
	hannes@cmpxchg.org, kamezawa.hiroyu@jp.fujitsu.com,
	jslaby@suse.cz, Valdis.Kletnieks@vt.edu, zcalusic@bitsync.net,
	vbabka@suse.cz, vdavydov@parallels.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: vmscan: Obey indeed proportional scanning for kswapd and memcg
Date: Wed, 25 Nov 2015 11:28:51 +0000	[thread overview]
Message-ID: <20151125112851.GP19677@suse.de> (raw)
In-Reply-To: <1448426900-2907-1-git-send-email-baiyaowei@cmss.chinamobile.com>

On Wed, Nov 25, 2015 at 12:48:20PM +0800, Yaowei Bai wrote:
> Commit e82e0561dae9f3ae5 ("mm: vmscan: obey proportional scanning
> requirements for kswapd") intended to preserve the proportional scanning
> and reclaim what was requested by get_scan_count() for kswapd and memcg
> by stopping reclaiming one type(anon or file) LRU and reducing the other's
> amount of scanning proportional to the original scan target.
> 
> So the way to determine which LRU should be stopped reclaiming should be
> comparing scanned/unscanned percentages to the original scan target of two
> lru types instead of absolute values what implemented currently, because
> larger absolute value doesn't mean larger percentage, there shall be
> chance that larger absolute value with smaller percentage, for instance:
> 
> 	target_file = 1000
> 	target_anon = 500
> 	nr_file = 500
> 	nr_anon = 400
> 
> in this case, because nr_file > nr_anon, according to current implement,
> we will stop scanning anon lru and shrink file lru. This breaks
> proportional scanning intent and makes more unproportional.
> 
> This patch changes to compare percentage to the original scan target to
> determine which lru should be shrunk.
> 
> Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com>

This one has gone back and forth a few times in the past. It really was
deliberate that the scanning was proportional to the scan target. While
I see what your concern is, it's unclear what the actual impact is. Have
you done any testing to check if the proposed new behaviour is actually
better?

-- 
Mel Gorman
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>

  reply	other threads:[~2015-11-25 11:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  4:48 [PATCH] mm: vmscan: Obey indeed proportional scanning for kswapd and memcg Yaowei Bai
2015-11-25 11:28 ` Mel Gorman [this message]
2015-11-30  9:04   ` Yaowei Bai
2015-12-01 11:52     ` Mel Gorman

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=20151125112851.GP19677@suse.de \
    --to=mgorman@suse.de \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=baiyaowei@cmss.chinamobile.com \
    --cc=hannes@cmpxchg.org \
    --cc=jslaby@suse.cz \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    --cc=vbabka@suse.cz \
    --cc=vdavydov@parallels.com \
    --cc=zcalusic@bitsync.net \
    /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).