On Wed, 11 Nov 2015, Ning Yao wrote: > >>>the code logic would touch crc cache is bufferlist::crc32c and invalidate_crc. > >>Also for pg_log::_write_log(), but seems it is always miss and use at > >>once, no need to cache crc actually? > > Oh, no, it will be hit in FileJournal writing > Still miss as buffer::ptr length diff with ::encode(crc, bl), right? > So the previous ebl.crc32c(0) calculation would be also no need to > cache. How about just skipping the cache logic if the raw length is less than some threshold? Say, 16KB or something? That would cover the _write_log case (small buffer) and more generally avoid the fixed overhead of caching when recalculating is cheap. This was originally added with large writes in mind to avoid the crc recalculation during journaling on armv7l. It is presumably also helping now that we have the opportunistic whole-object checksums for full or sequential writes. sage -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html