[lkml]   [2020]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 0/9] workingset protection/detection on the anonymous LRU list
On Thu, 20 Feb 2020 14:11:44 +0900 wrote:

> From: Joonsoo Kim <>
> Hello,
> This patchset implements workingset protection and detection on
> the anonymous LRU list.

The test robot measurement got my attention!

> * Changes on v2
> - fix a critical bug that uses out of index lru list in
> workingset_refault()
> - fix a bug that reuses the rotate value for previous page
> workingset protection
> In current implementation, newly created or swap-in anonymous page is
> started on the active list. Growing the active list results in rebalancing
> active/inactive list so old pages on the active list are demoted to the
> inactive list. Hence, hot page on the active list isn't protected at all.
> Following is an example of this situation.
> Assume that 50 hot pages on active list and system can contain total
> 100 pages. Numbers denote the number of pages on active/inactive
> list (active | inactive). (h) stands for hot pages and (uo) stands for
> used-once pages.
> 1. 50 hot pages on active list
> 50(h) | 0
> 2. workload: 50 newly created (used-once) pages
> 50(uo) | 50(h)
> 3. workload: another 50 newly created (used-once) pages
> 50(uo) | 50(uo), swap-out 50(h)
> As we can see, hot pages are swapped-out and it would cause swap-in later.
> Since this is what we want to avoid, this patchset implements workingset
> protection. Like as the file LRU list, newly created or swap-in anonymous
> page is started on the inactive list. Also, like as the file LRU list,
> if enough reference happens, the page will be promoted. This simple
> modification changes the above example as following.

One wonders why on earth we weren't doing these things in the first

> workingset detection

It sounds like the above simple aging changes provide most of the
improvement, and that the workingset changes are less beneficial and a
bit more risky/speculative?

If so, would it be best for us to concentrate on the aging changes
first, let that settle in and spread out and then turn attention to the
workingset changes?

 \ /
  Last update: 2020-02-27 04:41    [W:0.215 / U:0.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site