Re: [RFC 2/2] mm, slub: add shrinker to reclaim cached slabs

2021-01-26 Thread Vlastimil Babka
On 1/22/21 1:48 AM, Roman Gushchin wrote: > On Thu, Jan 21, 2021 at 06:21:54PM +0100, Vlastimil Babka wrote: > > Hi Vlastimil! > > This makes a lot of sense, however it looks a bit as an overkill to me (on > 5.9+). > Isn't limiting a number of pages (instead of number of objects) sufficient on

Re: [RFC 2/2] mm, slub: add shrinker to reclaim cached slabs

2021-01-21 Thread Roman Gushchin
On Thu, Jan 21, 2021 at 06:21:54PM +0100, Vlastimil Babka wrote: > For performance reasons, SLUB doesn't keep all slabs on shared lists and > doesn't always free slabs immediately after all objects are freed. Namely: > > - for each cache and cpu, there might be a "CPU slab" page, partially or

[RFC 2/2] mm, slub: add shrinker to reclaim cached slabs

2021-01-21 Thread Vlastimil Babka
For performance reasons, SLUB doesn't keep all slabs on shared lists and doesn't always free slabs immediately after all objects are freed. Namely: - for each cache and cpu, there might be a "CPU slab" page, partially or fully free - with SLUB_CPU_PARTIAL enabled (default y), there might be a