Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-17 Thread Christopher Lameter
On Wed, 17 Oct 2018, Vlastimil Babka wrote: > I.e. the benefits vs drawbacks of higher order allocations for SLAB are > out of scope here. It would be nice if somebody evaluated them, but the > potential resulting change would be much larger than what concerns this > patch. But it would arguably a

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-17 Thread Vlastimil Babka
On 10/16/18 5:17 PM, Christopher Lameter wrote: >> I'm not necessarily approaching this from a performance point of view, but >> rather as a means to reduce slab fragmentation when fallback to order-0 >> memory, especially when completely legitimate, is prohibited. From a >> performance standpoint

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-16 Thread Christopher Lameter
On Mon, 15 Oct 2018, David Rientjes wrote: > On Mon, 15 Oct 2018, Christopher Lameter wrote: > > > > > If the amount of waste is the same at higher cachep->gfporder values, > > > > there is no significant benefit to allocating higher order memory. > > > > There > > > > will be fewer calls to the

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-16 Thread Vlastimil Babka
On 10/12/18 11:24 PM, David Rientjes wrote: > The slab allocator has a heuristic that checks whether the internal > fragmentation is satisfactory and, if not, increases cachep->gfporder to > try to improve this. > > If the amount of waste is the same at higher cachep->gfporder values, > there is n

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-15 Thread David Rientjes
On Mon, 15 Oct 2018, Christopher Lameter wrote: > > > If the amount of waste is the same at higher cachep->gfporder values, > > > there is no significant benefit to allocating higher order memory. There > > > will be fewer calls to the page allocator, but each call will require > > > zone->lock a

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-15 Thread Christopher Lameter
On Fri, 12 Oct 2018, David Rientjes wrote: > @@ -1803,6 +1804,20 @@ static size_t calculate_slab_order(struct kmem_cache > *cachep, >*/ > if (left_over * 8 <= (PAGE_SIZE << gfporder)) > break; > + > + /* > + * If a highe

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-15 Thread Christopher Lameter
On Fri, 12 Oct 2018, Andrew Morton wrote: > > If the amount of waste is the same at higher cachep->gfporder values, > > there is no significant benefit to allocating higher order memory. There > > will be fewer calls to the page allocator, but each call will require > > zone->lock and finding the

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-12 Thread David Rientjes
On Fri, 12 Oct 2018, Andrew Morton wrote: > > The slab allocator has a heuristic that checks whether the internal > > fragmentation is satisfactory and, if not, increases cachep->gfporder to > > try to improve this. > > > > If the amount of waste is the same at higher cachep->gfporder values, > >

Re: [patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-12 Thread Andrew Morton
On Fri, 12 Oct 2018 14:24:57 -0700 (PDT) David Rientjes wrote: > The slab allocator has a heuristic that checks whether the internal > fragmentation is satisfactory and, if not, increases cachep->gfporder to > try to improve this. > > If the amount of waste is the same at higher cachep->gfporde

[patch] mm, slab: avoid high-order slab pages when it does not reduce waste

2018-10-12 Thread David Rientjes
The slab allocator has a heuristic that checks whether the internal fragmentation is satisfactory and, if not, increases cachep->gfporder to try to improve this. If the amount of waste is the same at higher cachep->gfporder values, there is no significant benefit to allocating higher order memory.