[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2111301038150.291899@gentwo.de>
Date: Tue, 30 Nov 2021 10:41:15 +0100 (CET)
From: Christoph Lameter <cl@...two.org>
To: Rustam Kovhaev <rkovhaev@...il.com>
cc: David Laight <David.Laight@...lab.com>,
'Vlastimil Babka' <vbabka@...e.cz>,
"penberg@...nel.org" <penberg@...nel.org>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"iamjoonsoo.kim@....com" <iamjoonsoo.kim@....com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"corbet@....net" <corbet@....net>,
"djwong@...nel.org" <djwong@...nel.org>,
"david@...morbit.com" <david@...morbit.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"dvyukov@...gle.com" <dvyukov@...gle.com>
Subject: Re: [PATCH v4] slob: add size header to all allocations
On Mon, 29 Nov 2021, Rustam Kovhaev wrote:
> > I'm not sure that helps.
> > The header can't share a cache line with the previous item (because it
> > might be mapped for DMA) so will always take a full cache line.
>
> I thought that DMA API allocates buffers that are larger than page size.
> DMA pool seems to be able to give out smaller buffers, but underneath it
> seems to be calling page allocator.
> The SLOB objects that have this header are all less than page size, and
> they cannot end up in DMA code paths, or can they?
kmalloc slab allocations must return dmaable memory. If the underlying
hardware can only dma to a cache line border then all objects must be
aligned that way.
Powered by blists - more mailing lists