lkml.org 
[lkml]   [2002]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: PCI DMA to small buffers on cache-incoherent arch
    Date

    > Based on the discussion, I think the answer for now is to go with
    > the (b) variant you had originally started with, using kmalloc for
    > the buffers. The __dma_buffer style macro didn't seem popular;
    > though I agree that it's not clear kmalloc() really solves it
    > today. (Given DaveM's SPARC example, the minimum size value it
    > returns would need to be 128 bytes ... which clearly isn't so.)

    Perhaps I might point out that we need a solution for 2.4.
    We certainly could go for kmalloc. But given the sparc64 example,
    it won't work. If you do it with alignment in your own buffer, you can
    control which fields are accessed.
    We'd need to export a worst case minimum size for kmalloc.
    Ugly, very ugly. Tons of kmalloc( size>MIN_DMA ? size : MIN_DMA,...

    But it seems that this would mean quite a painful change in many drivers.
    Which alignment macros wouldn't mean. In fact in the common case
    there'd be no code change at all.
    So if we take stability as a guideline, the alignment macros win without
    question.

    [..]
    > That'd certainly be a better approach for supporting sglist in the
    > usb-storage code than the alternatives I've heard so far.

    Could you elaborate ? This sounds interesting.

    > > I would like to see both dev_map_xxx etc. and something like
    > > __dma_buffer go into the kernel. I think they both have their uses.
    >
    > Got Patch? Actually, I know you do, I shouldn't ask. :)

    So perhaps something could be done in time for 2.4.20 ?

    Regards
    Oliver

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:26    [W:3.229 / U:0.220 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site