lkml.org 
[lkml]   [2021]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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.

    \
     
     \ /
      Last update: 2021-11-30 10:41    [W:2.280 / U:0.340 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site