]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
os/bluestore: detect unnecessary zeros in _do_write_small()
authorLaura Flores <lflores@redhat.com>
Fri, 24 Dec 2021 01:15:33 +0000 (01:15 +0000)
committerLaura Flores <lflores@redhat.com>
Fri, 24 Dec 2021 01:15:33 +0000 (01:15 +0000)
commit15cd3550320c9c6095dad0be021a9a87177deb46
tree4f7affd1a88b168288ccb77fc4fc0a667b70e71d
parenteb5290f690afdaa382617507491d04d6c9cfee59
os/bluestore: detect unnecessary zeros in _do_write_small()

Bluestore's `_do_write()` method handles writing data from bufferlists. Currently, it writes data from bufferlists without checking for unnecessary zeros. The lack zero detection may negatively impact performance.

In _do_write_small(), we check if a bufferlist is made up of zeros and avoid writing it if so.
Two new counters, `l_bluestore_write_small_skipped` and l_bluestore_write_small_skipped_bytes`, have been introduced to help us count how many zero blocks and bytes from _do_write_small() have been skipped.

Signed-off-by: Laura Flores <lflores@redhat.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h