lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230317140952.GA153257@cmpxchg.org>
Date:   Fri, 17 Mar 2023 10:09:52 -0400
From:   Johannes Weiner <hannes@...xchg.org>
To:     Yang Yang <yang.yang29@....com.cn>
Cc:     akpm@...ux-foundation.org, iamjoonsoo.kim@....com,
        linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        willy@...radead.org
Subject: Re: [PATCH linux-next] mm: workingset: simplify the calculation of
 workingset size

On Fri, Mar 17, 2023 at 01:59:03AM +0000, Yang Yang wrote:
> >On Thu, Mar 16, 2023 at 05:23:05PM +0800, yang.yang29@....com.cn wrote:
> >> From: Yang Yang <yang.yang29@....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?

That's what we do today.

The shadow entry remembers the reclaim root, so that refaults can
later evaluated at the same level. So, say you have:

root - A - A1
        `- A2

and A1 and A2 are reclaimed due to a limit in A. The shadow entries of
evictions from A1 and A2 will actually refer to A.

When they refault later on, the distance is interpreted based on
whether A has swap (eviction_lruvec).

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ