linux/drivers/mtd/chips
Stefani Seibold c4e773764c mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers.
The use of a memcpy() during a spinlock operation will cause very long
thread context switch delays if the flash chip bandwidth is low and the
data to be copied large, because a spinlock will disable preemption.

For example: A flash with 6,5 MB/s bandwidth will cause under ubifs,
which request sometimes 128 KiB (the flash erase size), a preemption delay of
20 milliseconds. High priority threads will not be served during this
time, regardless whether this threads access the flash or not. This behavior
breaks real time.

The patch changes all the use of spin_lock operations for xxxx->mutex
into mutex operations, which is exact what the name says and means.

I have checked the code of the drivers and there is no use of atomic
pathes like interrupt or timers. The mtdoops facility will also not be used
by this drivers. So it is dave to replace the spin_lock against mutex.

There is no performance regression since the mutex is normally not
acquired.

Changelog:
 06.03.2010 First release
 26.03.2010 Fix mutex[1] issue and tested it for compile failure

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-05-10 14:22:30 +01:00
..
cfi_cmdset_0001.c mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers. 2010-05-10 14:22:30 +01:00
cfi_cmdset_0002.c mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers. 2010-05-10 14:22:30 +01:00
cfi_cmdset_0020.c mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers. 2010-05-10 14:22:30 +01:00
cfi_probe.c [MTD] [NOR] Rename and export new cfi_qry_*() functions 2008-08-07 11:55:07 +01:00
cfi_util.c tree wide: remove execute flag from .c files 2010-02-04 11:55:44 +01:00
chipreg.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
fwh_lock.h mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers. 2010-05-10 14:22:30 +01:00
gen_probe.c mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers. 2010-05-10 14:22:30 +01:00
jedec_probe.c tree-wide: Assorted spelling fixes 2010-02-09 11:13:56 +01:00
Kconfig Kconfig: Remove useless and sometimes wrong comments 2009-11-09 09:40:56 +01:00
Makefile [MTD] [CHIPS] Remove MTD_OBSOLETE_CHIPS (jedec, amd_flash, sharp) 2007-05-09 13:34:37 +01:00
map_absent.c MTD/JFFS2: remove CVS keywords 2008-06-04 17:50:17 +01:00
map_ram.c NOMMU: Present backing device capabilities for MTD chardevs 2009-03-24 09:00:19 +00:00
map_rom.c NOMMU: Present backing device capabilities for MTD chardevs 2009-03-24 09:00:19 +00:00