Re: Trying to DMA data from PCI bus to IDE

phil_at_armstrong.invalid
Date: 08/20/03

  • Next message: Andi Kleen: "Re: TCP library"
    Date: Wed, 20 Aug 2003 09:50:13 +0100
    
    

    In article <5ff867d6.0308191032.6fc61c36@posting.google.com>,
    LegoGT <legoburns@yahoo.com> wrote:
    >I'm trying to use a PC104 IO board that utilizes the PLX PCI9080 chip
    >to handle DMA transfers across the PCI bus to the rest of the PC104
    >stack. I've been able to take the data from the IO board, DMA it to
    >memory, and then use the regular Linux functions to write it to the
    >hard drive. Even though my drive is using the highest UDMA settings
    >(ATA66 for a solid state drive) and have tweaked the hdparm, it seems
    >as if there's too much Linux file overhead involved to get it any
    >faster -- especially because I'm trying to "stream" lots of data
    >really fast for an extended time period to anywhere on the drive
    >(I'll deal with the partitions and FAT later). It seems as if Linux
    >"waits" for about 5sec before it starts to write ANYTHING to the
    >drive. Even if I turn off all of the caching settings in hdparm.
    >This tells me that it's a caching technique specific to the kernel
    >that *hopefully* I can turn off.

    hdparm has nothing to do with the kernel's in memory caching of disk
    buffers. Look at the values in /proc/sys/vm/ -- you can tweak these to
    make the kernel more aggressive about writing out dirty data.

    It sounds like you should really be using raw devices instead of
    buffered ones. Try setting up a raw device pointing to your disc
    partition and writing the data to that instead. I presume you've made
    sure that your solid state device is capable of sustained writes at
    the speed your data is coming in :)

    >So, Does anyone know of/have ideas about a way to configure the
    >PCI9080 chip or similar chip to DMA that data to a single address in
    >memory? I've set up the drive to receive data via DMA data and write
    >it to specific sectors so then the PCI9080 would need to be "pointed
    >to" a single location in memory (0x1f0 to be exact for the primary
    >IDE). I've been trying everything, but I think there might be
    >something having to do with how Linux maps the addresses in virtual
    >memory vs. physical for the PCI9080.
    >
    >Effectively, it should be set up to pull the data from the PCI source
    >(a FIFO address on the IO board) and perform a DMA transfer to memory
    >while NOT incrementing the destination address.

    Er. Can't you do PCI transfers directly between the two devices? No
    memory access required then. My knowledge of PCI programming is
    pretty sketchy, so I'm not sure how feasible this is in your case.

    cheers,

    Phil

    -- 
    http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt
    

  • Next message: Andi Kleen: "Re: TCP library"

    Relevant Pages

    • Re: A simple question about DMA, please help me.
      ... held by the DMA controller and the CPU is set idle until this transfer ... memory to fetch instructions while the DMA transfer is continuing. ... The PCI bus changed that -- it eliminated the separate lines for each ...
      (comp.lang.asm.x86)
    • Re: High-performance IO
      ... Any well implemented PCI DMA these days will both support over 4GB ... but discontinuities limit the length of the DMA transfers. ... If the length of a contiguous memory block is equal to the size ... I know that AWE can give the programmer a way to use ...
      (microsoft.public.win32.programmer.kernel)
    • [PATCH] Documentation: mv DMA-* to separate DMA/ subdirectory
      ... -This document describes the DMA API. ... -corresponding pci_ API. ... -for supporting non-consistent memory machines. ... -Many drivers need lots of small dma-coherent memory regions for DMA ...
      (Linux-Kernel)
    • Re: PCI DMA Address
      ... I don't think ioremap is what you want here. ... memory region on the card itself. ... Subject: PCI DMA Address ...
      (Linux-Kernel)
    • Re: Help with DMA in vxWorks for Thales PowerEngine 7
      ... I am a novice with PCI myself but have you setup the PCI bridge's ... back to the CPU memory address space. ... installed on a PMC carrier card to a Thales PowerEngine 7. ... The PCI card itself performs the DMA transfers ...
      (comp.os.vxworks)