Hi All: I find when write to SD card on Davinci, mmcqd eats 70% of the cpu!!, which cause audio and other tasks don't work well.
My configuration is below - DVEVM6446 from Spectrum Digital - linux-2.6.10_mvl401.patch47 from Montavista - Various SD card - 4bit bus width, DMA enabled, default mode (not highspeed mode) - change mmc_blk_issue_rq to use MMC_WRITE_MULTIPLE_BLOCK (instead of MMC_WRITE_BLOCK, as mvista githead does) - change wait_on_data to use cpu_relax (instead of udelay, as mvista githead does) - dd if=/dev/zero of=/dev/mmcblk0p1 bs=1M - top -d 1, and find mmcqd eats 70% cpu!! After some debugging, I find several factors causing the high cpu consumption (but not all) If I comment out wait_on_data invocation in mmc_davinci_request, mmcqd cpu consumption drops 40%. If I increase max_phys_segs,max_hw_segs from 2 to 8, mmcqd cpu consumption drops 10%. (Setting these params above 8 will cause problem: after send STOP_TRANSMISSION, mmci irq arrived with BSYDNE set, but DATDNE,TRNDNE not set, thus cause mmcqd permanently waiting in mmc_wait_for_req.) While on the other ARM board I have (Not-TI ARM926EJ SOC, PL180 MMC controller) mmcqd only eats 10% cpu in dd bs=1MB write test. So, I have several questions: 1. Why we call wait_on_data in mmc_davinci_request? I think we already have code polling card programming status in mmc_blk_issue_rq using MMC_SEND_STATUS and R1_READY_FOR_DATA. 2. Why max_phys_segs,max_hw_segs is set to that low number? And why raise these params will cause BSYDNE problem? (I'm not that familiar with BIO & EDMA code yet. On the PL180 MMC controller board mentioned above, these params are set to 16, per bio request contain 16KB, works without problem) 3. Is there any other place in davinci MMC driver which is eating cpu? 4. How we can fix them? Thanks Eddy _______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source