linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <js1304@gmail.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	 Michal Hocko <mhocko@kernel.org>,
	Hugh Dickins <hughd@google.com>, Minchan Kim <minchan@kernel.org>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Mel Gorman <mgorman@techsingularity.net>,
	kernel-team@lge.com,  Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v4 8/8] mm/swap: count a new anonymous page as a reclaim_state's rotate
Date: Tue, 24 Mar 2020 15:28:36 +0900	[thread overview]
Message-ID: <CAAmzW4Mts-EbsYGWbdJyAR01dsoVNR4OYbRDCxfp_eD_p4fD0w@mail.gmail.com> (raw)
In-Reply-To: <20200323174257.GF204561@cmpxchg.org>

2020년 3월 24일 (화) 오전 2:43, Johannes Weiner <hannes@cmpxchg.org>님이 작성:
>
> On Mon, Mar 23, 2020 at 02:52:12PM +0900, js1304@gmail.com wrote:
> > From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >
> > reclaim_stat's rotate is used for controlling the ratio of scanning page
> > between file and anonymous LRU. All new anonymous pages are counted
> > for rotate before the patch, protecting anonymous pages on active LRU, and,
> > it makes that reclaim on anonymous LRU is less happened than file LRU.
> >
> > Now, situation is changed. all new anonymous pages are not added
> > to the active LRU so rotate would be far less than before. It will cause
> > that reclaim on anonymous LRU happens more and it would result in bad
> > effect on some system that is optimized for previous setting.
> >
> > Therefore, this patch counts a new anonymous page as a reclaim_state's
> > rotate. Although it is non-logical to add this count to
> > the reclaim_state's rotate in current algorithm, reducing the regression
> > would be more important.
> >
> > I found this regression on kernel-build test and it is roughly 2~5%
> > performance degradation. With this workaround, performance is completely
> > restored.
> >
> > v2: fix a bug that reuses the rotate value for previous page
>
> I agree with the rationale, but the magic bit in the page->lru list
> pointers seems pretty ugly.

Yes, pretty ugly.

> I wrote a patch a few years ago that split lru_add_pvecs into an add
> and a putback component. This was to avoid unintentional balancing
> effects of LRU isolations, but I think you can benefit from that
> cleanup here as well. Would you mind taking a look at it and maybe
> take it up into your series?
>
> https://lore.kernel.org/patchwork/patch/685708/

Thanks for pointing that.
I will remove the magic bit and imitate your patch to solve the problem
of this patch.

Thanks.


      reply	other threads:[~2020-03-24  6:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23  5:52 [PATCH v4 0/8] workingset protection/detection on the anonymous LRU list js1304
2020-03-23  5:52 ` [PATCH v4 1/8] mm/vmscan: make active/inactive ratio as 1:1 for anon lru js1304
2020-03-23  5:52 ` [PATCH v4 2/8] mm/vmscan: protect the workingset on anonymous LRU js1304
2020-03-23  5:52 ` [PATCH v4 3/8] mm/workingset: extend the workingset detection for anon LRU js1304
2020-03-23  5:52 ` [PATCH v4 4/8] mm/swapcache: support to handle the exceptional entries in swapcache js1304
2020-03-23 16:50   ` Johannes Weiner
2020-03-23  5:52 ` [PATCH v4 5/8] mm/workingset: handle the page without memcg js1304
2020-03-23 16:51   ` Johannes Weiner
2020-03-23  5:52 ` [PATCH v4 6/8] mm/swap: implement workingset detection for anonymous LRU js1304
2020-03-23 17:17   ` Johannes Weiner
2020-03-24  6:25     ` Joonsoo Kim
2020-04-02  5:50       ` Joonsoo Kim
2020-04-02 15:14         ` Johannes Weiner
2020-03-23  5:52 ` [PATCH v4 7/8] mm/vmscan: restore active/inactive ratio " js1304
2020-03-23 17:18   ` Johannes Weiner
2020-03-23  5:52 ` [PATCH v4 8/8] mm/swap: count a new anonymous page as a reclaim_state's rotate js1304
2020-03-23 17:42   ` Johannes Weiner
2020-03-24  6:28     ` Joonsoo Kim [this message]

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=CAAmzW4Mts-EbsYGWbdJyAR01dsoVNR4OYbRDCxfp_eD_p4fD0w@mail.gmail.com \
    --to=js1304@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=kernel-team@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --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).