From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilya Yanok Date: Sat, 01 Nov 2008 04:00:26 +0300 Subject: [U-Boot] [PATCH/RFC] Some speed improvements to U-Boot JFFS2 code In-Reply-To: <48F73540.3020504@gmx.de> References: <1223877234-720-1-git-send-email-yanok@emcraft.com> <20081013081442.665DB85DAB1C@gemini.denx.de> <48F5E5CB.3070303@emcraft.com> <48F73540.3020504@gmx.de> Message-ID: <490BAA2A.6020806@emcraft.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Michael, Michael Lawnick wrote: > I have put these patches to our board (MPC8548, NOR Flash, MTD partition > size 48MB). > > a) performance has improved (execution time of 'ls' reduced from ~16s to > ~1.5s) > Sounds good. That is what we were expecting. > b) there is a bug in the patch > 0005-jffs2-add-buffer-to-cache-flash-accesses: > The passage > > @@ -724,12 +731,14 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 > inode, char *dest) > latestVersion = jNode->version; > } > } > - put_fl_mem(jNode); > + if (pL->readbuf == NULL) > + put_fl_mem(jNode); > } > #endif > > should be > > @@ -724,12 +731,14 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 > inode, char *dest) > latestVersion = jNode->version; > } > } > - put_fl_mem(jNode); > + if (pL->readbuf == NULL) > + put_fl_mem(jNode, NULL); > } > #endif > You are right. We haven't just tried to use CFG_JFFS2_SORT_FRAGMENTS... > c) I found no improvement with CFG_JFFS2_SORT_FRAGMENTS set (the way I > detected b) ;-) > Same as above... We don't use CFG_JFFS2_SORT_FRAGMENTS... But it's very sad result really... I have no idea what is wrong with it... > d) output of 'ls' is corrupted: no date and access right output, > directories in / are shown multiple times Can you please be more specific on this? Is this with CFG_JFFS2_SORT_FRAGMENTS enabled or not? How did you create your FS? I can't reproduce any of described symptoms on our system... The only thing I can tell you for now is that the first patch from my posting is wrong, the following patch fixes the problem: