On Fri, 19 Jul 2002, Ben Fennema wrote:
On Fri, Jul 19, 2002 at 01:33:13PM +0200, Peter Osterlund wrote:
On Thu, 18 Jul 2002, Ben Fennema wrote:
On Thu, Jul 18, 2002 at 11:31:21PM +0200, Peter Osterlund wrote:
I still think that's true, but I have some more information on the udf filesystem behavior. If I create a new udf filesystem and start adding lots of small files to it, at first (before dirty data writeback starts) the speed at which files are added is limited by how fast data can be *read* from the CD. I haven't looked at the udf code yet, but I would guess the udf filesystem reads a disk block for each file being added.
Hmm, it could be an issue with data being embedded in the inode. The data would go through the page cache, but the inode would go through the buffer cache, and this could force a read or something funky like that.
Mounting with -o noadinicb turns off this behavior. You could try it and see if it eliminates the extra reads.
There are still reads. I'm not sure if it's exactly the same amount of reads, but I didn't notice any difference in performance.
(But maybe you already know what the problem is. I got that impression from your other mail.)
Ok, here's a patch which should fix the problem.
Wow, that was quick.
Let me know if it shows a noticeable improvement (or if you can't get it to apply nicely to whatever kernel version your using) =]
Yes it works perfectly. I applied it to the 2.4 cvs tree then copied it into the 2.4.19-rc2 tree. Compilation complained about a missing i_bh struct member, but this patch fixed it: --- udf_fs_i.h.orig Fri Jul 19 23:06:35 2002 +++ udf_fs_i.h Fri Jul 19 21:53:43 2002 @@ -47,6 +47,7 @@ unsigned i_strat_4096 : 1; unsigned i_new_inode : 1; unsigned reserved : 26; + struct buffer_head *i_bh; }; #endif With your patch, there are no reads when adding files. It appears to be just as efficient as ext2. Good work! Unfortunately I can't really stress test this because of the deadlock bug in usb-storage under high memory pressure. -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340