Re: [PATCH] mm: allow to decrease swap.max below actual swap usage

2018-04-17 Thread Roman Gushchin
Hi, Tejun! On Sun, Apr 15, 2018 at 06:39:02PM -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

Re: [PATCH] mm: allow to decrease swap.max below actual swap usage

2018-04-16 Thread Rik van Riel
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 co

Re: [PATCH] mm: allow to decrease swap.max below actual swap usage

2018-04-15 Thread Tejun Heo
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. * The reclaim seems very inefficient. IIUC, it has to read every swap

[PATCH] mm: allow to decrease swap.max below actual swap usage

2018-04-12 Thread Roman Gushchin
Currently an attempt to set swap.max into a value lower than the actual swap usage fails. And a user can't do much with it, except turning off swap globally (using swapoff). This is an actual problem we met in the production. The default value for swap.max is "max", so turning swap on globally may