mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Yang <yang.yang29@zte.com.cn>
To: hannes@cmpxchg.org
Cc: akpm@linux-foundation.org, iamjoonsoo.kim@lge.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	willy@infradead.org, yang.yang29@zte.com.cn
Subject: Re:  [PATCH linux-next] mm: workingset: simplify the calculation of workingset size
Date: Fri, 17 Mar 2023 01:59:03 +0000	[thread overview]
Message-ID: <20230317015903.16978-1-yang.yang29@zte.com.cn> (raw)
In-Reply-To: <20230316143007.GC116016@cmpxchg.org>

>On Thu, Mar 16, 2023 at 05:23:05PM +0800, yang.yang29@zte.com.cn wrote:
>> From: Yang Yang <yang.yang29@zte.com.cn>
>> 
>> After we implemented workingset detection for anonymous LRU[1],
>> the calculation of workingset size is a little complex. Actually there is
>> no need to call mem_cgroup_get_nr_swap_pages() if refault page is
>> anonymous page, since we are doing swapping then should always
>> give pressure to NR_ACTIVE_ANON.
>
> This is false.
>
> (mem_cgroup_)get_nr_swap_pages() returns the *free swap slots*. There
> might be swap, but if it's full, reclaim stops scanning anonymous
> pages altogether. That means that refaults of either type can no
> longer displace existing anonymous pages, only cache.

I see in this patch "mm: vmscan: enforce inactive:active ratio at the
reclaim root", reclaim will be done in the combined workingset of
different workloads in different cgroups.

So if current cgroup reach it's swap limit(mem_cgroup_get_nr_swap_pages(memcg) == 0),
but other cgroup still has swap slot, should we allow the refaulting page
to active and give pressure to other cgroup?

  reply	other threads:[~2023-03-17  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16  9:23 yang.yang29
2023-03-16 13:14 ` Matthew Wilcox
2023-03-16 14:30 ` Johannes Weiner
2023-03-17  1:59   ` Yang Yang [this message]
2023-03-17 14:09     ` Johannes Weiner
2023-03-18  3:10       ` Yang Yang

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=20230317015903.16978-1-yang.yang29@zte.com.cn \
    --to=yang.yang29@zte.com.cn \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.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

all inboxes | Powered by JetHome®