lkml.org 
[lkml]   [2010]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines
    From
    Hi Dmitry,

    On Tue, May 11, 2010 at 9:33 AM, Dmitry Torokhov
    <dmitry.torokhov@gmail.com> wrote:
    >> what guarantee exactly do you have for that statement ?
    >
    > The data is kmalloced, kmalloc aligns on cacheline boundary AFAIK which
    > means that next kmalloc data chunk will not share "our" cacheline.

    No, there are no such guarantees. kmalloc() aligns on
    ARCH_KMALLOC_MINALIGN or ARCH_SLAB_MINALIGN depending on which is
    bigger but beyond that, there are no guarantees. You can, of course,
    use kmem_cache_create() with SLAB_HWCACHE_ALIGN to align on cacheline
    boundary.

    Pekka


    \
     
     \ /
      Last update: 2010-05-12 11:35    [W:2.937 / U:0.304 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site