nandbase performance
Subsystems (2)
PATCH 1/1 nandbase performance
Here is a patch against nand_base.c that improves partial page read performance. The patch simply replaces a byte-by-byte copy in a for-loop with a memcpy() call. Jffs2 does a lot of these partial page reads.
Pete
drivers/mtd/nand/nand_base.c +3 -2
@@ -1311,8 +1311,9 @@ readdata:/* Partial page read, transfer data into fs buffer */ if (!aligned) { -for (j = col; j < end && read < len; j++) - buf[read++] = data_poi[j]; +int bytes_to_copy =min (end - col, (int )len - read); +memcpy (&buf[read], &data_poi[col], bytes_to_copy); + read += bytes_to_copy; this->pagebuf = realpage; }else read += mtd->oobblock;