Review Request: fix wrap-around with partitions over 4 TB by using a 64-bit counter

Anssi Hannula anssi at mageia.org
Thu Jan 5 16:40:00 UTC 2012



> On Jan. 5, 2012, 2:39 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> > have you measured memory usage?

On the same test filesystem with a 32-bit binary, the resident memory usage after a completed scan is 72-73 MB regardless of quint32 and quint64 (I also checked the output for overflows to make sure I didn't run a wrong version).


- Anssi


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103496/#review9571
-----------------------------------------------------------


On Dec. 21, 2011, 7:44 p.m., Anssi Hannula wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103496/
> -----------------------------------------------------------
> 
> (Updated Dec. 21, 2011, 7:44 p.m.)
> 
> 
> Review request for KDE Utils.
> 
> 
> Description
> -------
> 
> Filelight uses a divide-by-1024 trick to fit sizes over 4 GB into a
> quint32. However, the current code will wrap around again at 4 TB.
> 
> Simply switch to quint64 and drop the use of divide-by-1024 trick to get
> rid of the 4 TB wrap-around.
> 
> The performance penalty on a 32-bit system seems immeasurable. On a
> filesystem with 1500000 files (13 TB) the process user time is only 1..5
> seconds on i7-960, with quint32/64 having no effect. Most of the
> wallclock time (20..500 sec in the above case, depending on cache
> state) is spent waiting for I/O anyway.
> 
> Note that on 32-bit systems files over 2 GB are still completely ignored
> unless built with large file support.
> 
> 
> Note that this patch is on top of https://reviewboard.kde.org/r/102870/
> 
> 
> Diffs
> -----
> 
>   src/part/fileTree.h fe0a9ec 
>   src/part/fileTree.cpp 6da7a8f 
>   src/part/localLister.cpp 588a56a 
>   src/part/remoteLister.cpp 139b7a7 
>   src/part/summaryWidget.cpp ebbc516 
> 
> Diff: http://git.reviewboard.kde.org/r/103496/diff/diff
> 
> 
> Testing
> -------
> 
> Built git master with the patch, tested to fix wrap-around on both 64-bit and 32-bit systems, and checked briefly that performance didn't suffer as noted in the description.
> 
> 
> Thanks,
> 
> Anssi Hannula
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20120105/e9695ddd/attachment.html>


More information about the Kde-utils-devel mailing list