Re: [RFC 07/15] slub: Add defrag_used_ratio field and sysfs support

2019-03-11 Thread Tobin C. Harding
On Fri, Mar 08, 2019 at 09:01:51AM -0700, Tycho Andersen wrote: > On Fri, Mar 08, 2019 at 03:14:18PM +1100, Tobin C. Harding wrote: > > --- a/mm/slub.c > > +++ b/mm/slub.c > > @@ -3642,6 +3642,7 @@ static int kmem_cache_open(struct kmem_cache *s, > > slab_flags_t flags) > > > >

Re: [RFC 07/15] slub: Add defrag_used_ratio field and sysfs support

2019-03-08 Thread Tycho Andersen
On Fri, Mar 08, 2019 at 03:14:18PM +1100, Tobin C. Harding wrote: > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -3642,6 +3642,7 @@ static int kmem_cache_open(struct kmem_cache *s, > slab_flags_t flags) > > set_cpu_partial(s); > > + s->defrag_used_ratio = 30; > #ifdef CONFIG_NUMA >

[RFC 07/15] slub: Add defrag_used_ratio field and sysfs support

2019-03-07 Thread Tobin C. Harding
In preparation for enabling defragmentation of slab pages. "defrag_used_ratio" is used to set the threshold at which defragmentation should be attempted on a slab page. "defrag_used_ratio" is a percentage in the range of 0 - 100 (inclusive). If less than that percentage of slots in a slab page