From: Kosugi, T. <Tak...@am...> - 2007-02-01 09:11:12
|
Hi Greg, Phillips, >These fixes are in the latest Squashfs 3.2 available from Sourceforge. >Could you give it a try to see if it fixes the bugs? I'm the guy who struggled against cache coherency issue with Greg until he came up with the idea that the PREF instruction was doing something wrong in the memcpy. I've tried the latest 3.2 with the kernel 2.6.11. It works very well without any workarounds for the memcpy. And the read performance is much better than 3.1R2. >I had a look into what work-arounds I could do in Squashfs. I think >I've reworked the code to avoid this issue For compressed blocks the >memcpy has been removed entirely (it is now passed block by block to >zlib_inflate), and for non-compressed blocks the code has been >reorganised. I've looked at the function squashfs_read_data() for non-compressed case. The memcpy seems to be applied to the same source buffer as we found the problem in 3.1R2. Is this safe? I've tried -noI, -noD, -noF options and I don't see any problem so far. I'd like to know if I'm just lucky or not.=20 for (bytes =3D 0; k < b; k++) { avail_bytes =3D (c_byte - bytes) > (msblk->devblksize - offset) ? msblk->devblksize - offset : c_byte - bytes; memcpy(buffer + bytes, bh[k]->b_data + offset, avail_bytes); bytes +=3D avail_bytes; offset =3D 0; brelse(bh[k]); } Thank you. Good job! -- Taku |