[PATCH] cfi: Fixup of write errors on XIP

Nicolas Pitre nico at cam.org
Thu Mar 30 09:38:35 EST 2006


On Thu, 30 Mar 2006, Alexey, Korolev wrote:

> > Please find attached a patch for what I mean.
> > 
> > Could you test it and confirm the problem is actually gone?
> >  
> This code definetely will not cause the write error issue on XIP.
> For just a case I made tests. No write errors were faced after 3 hours of
> testing.

Good.  It also constitute a nice cleanup, as shown by diffstat:

 1 files changed, 156 insertions(+), 264 deletions(-)

> I have one comment to the patch:
> 
> > +
> > +	if (!z) {
> > +		if (!--(*chip_op_time))
> > +			*chip_op_time = 1;
> > +	} else if (z > 1)
> > +		*chip_op_time += z/2;
> > 
> This change may negativelly affect on write performance in case of SND kernel
> configuration.
> The process of write timeout increasing if faster than process of write
> timeout decreasing.
> If we consider write time as a random value with mean =
> chip->buffer_write_time and unknown variance.
> It means that average buffer write timeout will be greater than necessary
> timeout.

True.  I wanted for the delay to converge faster, especially in the 
erase case which is much larger.  I'll commit the patch with the 
original increment and think of a solution for better convergence in a 
separate patch.

Thanks for testing.


Nicolas




More information about the linux-mtd mailing list