Write performance issue with cfi_cmdset_0001.c

Nicolas Pitre nico at cam.org
Fri Oct 28 17:34:38 EDT 2005


On Fri, 28 Oct 2005, Josh Boyer wrote:

> I'll preface this with a disclaimer that we saw this on 2.4, however the
> same general issue still seems to be present in MTD CVS.

For 2.6.x? Are you sure?

> Basically, the writing thread was starving kupdated from making any
> progress and since kupdated was never charged with any time, the writing
> thread was always being marked as needing to be scheduled in the wake_up
> code.  This cause it to do a schedule_timeout(1) every buffer write (32
> bytes).  In 2.4, that's approximately 10 milliseconds of wait time
> because it's based on jiffies.

In 2.6 there is no schedule_timeout() anywhere in the MTD code.

> For a fix, we added a conditional reschedule in the loop that calls
> do_write_buffer in the cfi_intelext_write_buffers function.  This made
> write times of 256KiB go from 20-50 seconds to 1-6 seconds on average.

I still can't figure out the linear sequence of events that can lead to 
the behavior you're seeing.

Mind re-doing your explanation in pseudocode-like form to help my poor 
brain please?


Nicolas




More information about the linux-mtd mailing list