[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <010001697032e074-f9658e7a-595f-4804-a7a0-fd4220ee8473-000000@email.amazonses.com>
Date: Tue, 12 Mar 2019 04:39:36 +0000
From: Christopher Lameter <cl@...ux.com>
To: Roman Gushchin <guro@...com>
cc: "Tobin C. Harding" <tobin@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Pekka Enberg <penberg@...helsinki.fi>,
Matthew Wilcox <willy@...radead.org>,
Tycho Andersen <tycho@...ho.ws>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC 04/15] slub: Enable Slab Movable Objects (SMO)
On Mon, 11 Mar 2019, Roman Gushchin wrote:
> > +static inline void *alloc_scratch(struct kmem_cache *s)
> > +{
> > + unsigned int size = oo_objects(s->max);
> > +
> > + return kmalloc(size * sizeof(void *) +
> > + BITS_TO_LONGS(size) * sizeof(unsigned long),
> > + GFP_KERNEL);
>
> I wonder how big this allocation can be?
> Given that the reason for migration is probably highly fragmented memory,
> we probably don't want to have a high-order allocation here. So maybe
> kvmalloc()?
The smallest object size is 8 bytes which is one word which would be
places in an order 0 page. So it comes out to about a page again.
Larger allocation orders are possible if the slab pages itself can have
larger orders of course. If you set the min_order to the huge page order
then we can have similar sized orders for the allocation of the scratch
space. However, that is not a problem since the allocations for the slab
pages itself are also already of that same order.
Powered by blists - more mailing lists