[lkml]   [2018]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: allow to decrease swap.max below actual swap usage
On Sun, 2018-04-15 at 18:39 -0700, Tejun Heo wrote:
> Hello, Roman.
> The reclaim behavior is a bit worrisome.
> * It disables an entire swap area while reclaim is in progress. Most
> systems only have one swap area, so this would disable allocating
> new swap area for everyone.

That could easily cause OOM kills on systems.

I prefer Tejun's simple approach, of having
the system slowly reduce swap use below the
new maximum limit.

> * The reclaim seems very inefficient. IIUC, it has to read every
> swap
> page to see whether the page belongs to the target memcg and for
> each matching page, which involves walking page mm's and page
> tables.

One of my Outreachy interns, Kelley Nielsen,
worked on making swap reclaim more efficient
by scanning the virtual address space of

Unfortunately, we ran into some unforseen
issues with that approach that we never managed
to sort out :(

> Signed-off-by: Tejun Heo <>

Acked-by: Rik van Riel <>

All Rights Reversed.[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2018-04-16 17:08    [W:0.038 / U:9.144 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site