Re: [RFC PATCH 1/1] vmscan: Support multiple kswapd threads per node

From: Mel Gorman
Date: Fri Oct 02 2020 - 04:40:49 EST


On Fri, Oct 02, 2020 at 09:03:33AM +0200, Michal Hocko wrote:
> > > My recollection of the particular patch is dimm but I do remember it
> > > tried to add more kswapd threads which would just paper over the problem
> > > you are seein rather than solve it.
> >
> > Yeah, that's exactly what it does, just adding more kswap threads.
>
> Which is far from trivial because it has its side effects on the over
> system balanc.

While I have not read the original patches, multiple kswapd threads will
smash into the LRU lock repeatedly. It's already the case that just plain
storms of page cache allocations hammer that lock on pagevec releases and
gets worse as memory sizes increase. Increasing LRU lock contention when
memory is low is going to have diminishing returns.

--
Mel Gorman
SUSE Labs