diff options
author | Alexey Korolev <akorolev@infradead.org> | 2008-05-15 12:23:18 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-07-25 10:49:50 -0400 |
commit | 3d45955962496879dead8d4dd70bb9a23b07154b (patch) | |
tree | af34201ba3bfc195a22ceac43a1c22f2f7c2fbe8 /include/linux/mtd | |
parent | ff877ea80efa2015b6263766f78ee42c2a1b32f9 (diff) |
[MTD] [NAND] subpage read feature as a way to increase performance.
This patch enables NAND subpage read functionality.
If upper layer drivers are requesting to read non page aligned data NAND
subpage-read functionality reads the only whose ECC regions which include
requested data when original code reads whole page.
This significantly improves performance in many cases.
Here are some digits :
UBI volume mount time
No subpage reads: 5.75 seconds
Subpage read patch: 2.42 seconds
Open/stat time for files on JFFS2 volume:
No subpage read 0m 5.36s
Subpage read 0m 2.88s
Signed-off-by Alexey Korolev <akorolev@infradead.org>
Acked-by: Artem Bityutskiy <dedekind@infradead.org>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/nand.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 863e22a0ddb5..83f678702dff 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -177,6 +177,7 @@ typedef enum { | |||
177 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) | 177 | #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING)) |
178 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) | 178 | #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG)) |
179 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) | 179 | #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK)) |
180 | #define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT)) | ||
180 | 181 | ||
181 | /* Mask to zero out the chip options, which come from the id table */ | 182 | /* Mask to zero out the chip options, which come from the id table */ |
182 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) | 183 | #define NAND_CHIPOPTIONS_MSK (0x0000ffff & ~NAND_NO_AUTOINCR) |
@@ -274,6 +275,10 @@ struct nand_ecc_ctrl { | |||
274 | int (*read_page)(struct mtd_info *mtd, | 275 | int (*read_page)(struct mtd_info *mtd, |
275 | struct nand_chip *chip, | 276 | struct nand_chip *chip, |
276 | uint8_t *buf); | 277 | uint8_t *buf); |
278 | int (*read_subpage)(struct mtd_info *mtd, | ||
279 | struct nand_chip *chip, | ||
280 | uint32_t offs, uint32_t len, | ||
281 | uint8_t *buf); | ||
277 | void (*write_page)(struct mtd_info *mtd, | 282 | void (*write_page)(struct mtd_info *mtd, |
278 | struct nand_chip *chip, | 283 | struct nand_chip *chip, |
279 | const uint8_t *buf); | 284 | const uint8_t *buf); |