[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00000142be2f1de0-764bb035-adbc-4367-b2b4-bf05498510a6-000000@email.amazonses.com>
Date: Wed, 4 Dec 2013 15:17:08 +0000
From: Christoph Lameter <cl@...ux.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Joonsoo Kim <iamjoonsoo.kim@....com>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>, azurIt <azurit@...ox.sk>,
linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org,
Christian Casteyde <casteyde.christian@...e.fr>,
Pekka Enberg <penberg@...nel.org>
Subject: Re: [patch 2/2] fs: buffer: move allocation failure loop into the
allocator
On Tue, 3 Dec 2013, Andrew Morton wrote:
> > page = alloc_slab_page(alloc_gfp, node, oo);
> > if (unlikely(!page)) {
> > oo = s->min;
>
> What is the value of s->min? Please tell me it's zero.
It usually is.
> > @@ -1349,7 +1350,7 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
> > && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) {
> > int pages = 1 << oo_order(oo);
> >
> > - kmemcheck_alloc_shadow(page, oo_order(oo), flags, node);
> > + kmemcheck_alloc_shadow(page, oo_order(oo), alloc_gfp, node);
>
> That seems reasonable, assuming kmemcheck can handle the allocation
> failure.
>
>
> Still I dislike this practice of using unnecessarily large allocations.
> What does it gain us? Slightly improved object packing density.
> Anything else?
The fastpath for slub works only within the bounds of a single slab page.
Therefore a larger frame increases the number of allocation possible from
the fastpath without having to use the slowpath and also reduces the
management overhead in the partial lists.
There is a kernel parameter that can be used to control the maximum order
slub_max_order
The default is PAGE_ALLOC_COSTLY_ORDER. See also
Documentation/vm/slub.txt.
Booting with slub_max_order=1 will force order 0/1 pages.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists