lkml.org 
[lkml]   [2008]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC v2 5/5] Atmel MCI: Driver for Atmel on-chip MMC controllers
    On Wed, 13 Feb 2008 16:55:54 -0700
    "Dan Williams" <dan.j.williams@intel.com> wrote:

    > Well, the other two possibilities are:
    >
    > 1/ Spin/sleep until a descriptor shows up

    Won't work since the transfer hasn't been started yet, so it will spin
    indefinitely.

    I guess we could return, send the command and use a waitqueue to wait
    for the callback. But this will make error handling seriously yucky.


    > 2/ Fall back to PIO for a few transfers

    Which means killing performance for large transfers. Not really an
    option.

    It's ok to use PIO for small and/or odd transfers like "read 2 bytes
    from this SDIO register", something that the mmc-block driver would
    never ask us to do. Using PIO for huge block data transfers will really
    hurt.

    > Descriptor availability is improved if the code interleaves allocation
    > and submission. Currently it looks like we wait until all descriptors
    > for the scatterlist are allocated before we start submitting.

    No, none of the descriptors will appear before the command has been
    sent, the card has responded, and a full block of data has been
    transferred. I suppose we could send the command earlier, but I don't
    think it will help a lot and it will complicate error handling.

    There may be room for improvement though. The current scheme of
    splitting DMA preparation and submission was initially used because
    older versions of the controller would instantly fail with an overrun
    or underrun if the data wasn't available immediately when the command
    had been sent. Sending the command earlier and doing interleaved
    allocation and submission might improve performance a bit.

    I think I'll try triggering the mmc tasklet from the DMA callback for
    now. Scheduling a tasklet from another tasklet should work just fine,
    right?

    Haavard


    \
     
     \ /
      Last update: 2008-02-14 09:39    [W:0.040 / U:0.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site