pci board and maximum dma buffer - Linux

This is a discussion on pci board and maximum dma buffer - Linux ; Hi, by means of pci_alloc_consistent I have seen that the maximum buffer I can allocate is 4MB. I'm working on a i386 machine/kernel. The DMA transference happens from my board to the system memory. For this architecture the limitation relates ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: pci board and maximum dma buffer

  1. pci board and maximum dma buffer

    Hi,

    by means of pci_alloc_consistent I have seen that the maximum buffer I
    can allocate is 4MB. I'm working on a i386 machine/kernel. The DMA
    transference happens from my board to the system memory. For this
    architecture the limitation relates with alloc_pages and MAX_ORDER=11
    as defined in linux/mmzone.h

    Is this a hard limit for an i386 type machine? What's the reason for
    this limitation?

    I have seen that for ia64 there is kernel configuration named
    CONFIG_FORCE_MAX_ZONEORDER. But it seems that it makes no sense for
    i386.

    thanks,
    Rodrigo


  2. Re: pci board and maximum dma buffer

    On Fri, 23 Jun 2006 10:53:19 -0700, ramestica wrote:

    > by means of pci_alloc_consistent I have seen that the maximum buffer I
    > can allocate is 4MB. I'm working on a i386 machine/kernel.


    Actually, you cannot allocated that much on a system which worked
    for any period of time, because of fragmentation. You have to consider
    a scatter-gather buffering system.

    -- Pete


  3. Re: pci board and maximum dma buffer

    Hi Pete, thanks for your reply.

    I'm planning to use scatter-gather buffering for acomplishing
    application specific details, and I wanted to keep out of this
    abstraction level the need for coping with the smaller chunks of memory
    I'm actually able to allocate.

    I did not fully understand the fragmentation issue. If I allocate a big
    buffer for dma I'm assuming that this buffer will remanin continous in
    physical ram until I free it. How does the framentation you mentioned
    comes into play?

    thanks,
    Rodrigo


    Pete Zaitcev wrote:
    > On Fri, 23 Jun 2006 10:53:19 -0700, ramestica wrote:
    >
    > > by means of pci_alloc_consistent I have seen that the maximum buffer I
    > > can allocate is 4MB. I'm working on a i386 machine/kernel.

    >
    > Actually, you cannot allocated that much on a system which worked
    > for any period of time, because of fragmentation. You have to consider
    > a scatter-gather buffering system.
    >
    > -- Pete



  4. Re: pci board and maximum dma buffer

    On Sat, 24 Jun 2006 16:32:39 -0700, ramestica wrote:

    > I did not fully understand the fragmentation issue. If I allocate a big
    > buffer for dma I'm assuming that this buffer will remanin continous in
    > physical ram until I free it. How does the framentation you mentioned
    > comes into play?


    You will not be able to allocate this buffer most of the time,
    except immediately after the system boot, if then.

    -- Pete


+ Reply to Thread