[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANMq1KBYAgoPh37e+BPz7xK4z3jJ4Gm30Gs662+_gTdM8v0QDA@mail.gmail.com>
Date: Wed, 28 Nov 2018 16:55:54 +0800
From: Nicolas Boichat <drinkcat@...omium.org>
To: hch@...radead.org
Cc: Vlastimil Babka <vbabka@...e.cz>,
Robin Murphy <robin.murphy@....com>, willy@...radead.org,
Christoph Lameter <cl@...ux.com>,
Levin Alexander <Alexander.Levin@...rosoft.com>,
Mike Rapoport <rppt@...ux.vnet.ibm.com>,
Huaisheng Ye <yehs1@...ovo.com>,
Tomasz Figa <tfiga@...gle.com>,
Will Deacon <will.deacon@....com>,
lkml <linux-kernel@...r.kernel.org>,
Pekka Enberg <penberg@...nel.org>, linux-mm@...ck.org,
iommu@...ts.linux-foundation.org, Michal Hocko <mhocko@...e.com>,
linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
David Rientjes <rientjes@...gle.com>,
Matthias Brugger <matthias.bgg@...il.com>,
yingjoe.chen@...iatek.com, Joonsoo Kim <iamjoonsoo.kim@....com>,
Mel Gorman <mgorman@...hsingularity.net>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables
On Mon, Nov 26, 2018 at 4:02 PM Christoph Hellwig <hch@...radead.org> wrote:
>
> On Fri, Nov 23, 2018 at 01:23:41PM +0100, Vlastimil Babka wrote:
> > Is this also true for caches created by kmem_cache_create(), that
> > debugging options can result in not respecting the alignment passed to
> > kmem_cache_create()? That would be rather bad, IMHO.
>
> That's what I understood in the discussion. If not it would make
> our live simpler, but would need to be well document.
>From my experiment, adding `slub_debug` to command line does _not_
break the alignment of kmem_cache_alloc'ed objects.
We do see an increase in slab_size
(/sys/kernel/slab/io-pgtable_armv7s_l2/slab_size), from 1024 to 3072
(probably because slub needs to allocate space on each side for the
red zone/padding, while keeping the alignment?)
> Christoph can probably explain the alignment choices in slub.
>
> >
> > > But I do agree with the sentiment of not wanting to spread GFP_DMA32
> > > futher into the slab allocator.
> >
> > I don't see a problem with GFP_DMA32 for custom caches. Generic
> > kmalloc() would be worse, since it would have to create a new array of
> > kmalloc caches. But that's already ruled out due to the alignment.
>
> True, purely slab probably isn't too bad.
Powered by blists - more mailing lists