[GSOC] HAMMER2 compression feature week4 report

Daniel Flores daniel5555 at gmail.com
Sat Jul 13 12:09:35 PDT 2013

Hello everyone,

Here is my week 4 report. In my previous mail I mentioned that I was
working on write path. Now the write path seems to be complete together
with the read path. Compression/decompression functions are there too and
they seem to work, but the feature itself doesn't quite work yet.

What happens is that even though the functions are present there and they
seem to do their job, when I try to open the compressed files stored on
HAMMER2 drive, they aren't quite the same as the originals stored on
another drive. They can be opened correctly at times, and the contents are
readable sometimes too, but it is clear that something goes wrong
somewhere. I'm not sure yet whether the problem occurs during compression
stage, decompression stage, or both, but this has to be fixed. I expected
something like this to happen, so starting this weekend and the next week
I'll be working on debugging this and, hopefully, the results will be
positive soon.

Another issue is the efficiency. While I was building those write and read
paths, my main goal was simply to get them to work. Now that they seem to
work generally, I must make them more efficient than they are now. The main
issue currently is that in order to perform compression and decompression
they use a buffer that must be allocated before performing the task. The
data goes like this: logical block -> buffer -> physical block for
compression and physical block -> buffer -> logical block for
decompression. It would be much better to go directly from one block to
another and avoid to use that buffer altogether. The good news is that even
those inefficient paths are quite fast. The delay is noticeable, but it's
not too big for the feature to be unusable. So, hopefully, with the further
optimizations, there won't be any noticeable delay at all compared with the
case when there isn't any compression performed on files.

So, my next task will be debugging the current paths and once they will
work correctly, I'll be working on optimizing them.

My code is available in my repository, "hammer2_LZ4" branch [1]. I'll
appreciate any suggestion, criticism and other feedback.


[1] git://leaf.dragonflybsd.org/~iostream/dragonfly.git
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20130713/187359d7/attachment.html>

More information about the Kernel mailing list