]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: cache metadata during trimming to prevent from disk read 56250/head
authormyoungwon oh <ohmyoungwon@gmail.com>
Mon, 18 Mar 2024 06:48:07 +0000 (06:48 +0000)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 18 Mar 2024 11:51:34 +0000 (11:51 +0000)
I encountered continous disk reads during trimming even though there are sufficient
cache available, in 4K random write test with RBM (RBD).
This is because metadata is note cached if its source is background transaction
within touch_extent(). So, seastore, including the trimming process,  needs to
constantly retrieve metadata (e.g., BACKREF_LEAF).

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/crimson/os/seastore/cache.h

index 75463f465fe14c7d68b38701906d8851ab76973e..829d57da19312a0ba46ba28f9dbbdc1037d93fe8 100644 (file)
@@ -1342,8 +1342,11 @@ public:
       CachedExtent &ext,
       const Transaction::src_t* p_src=nullptr)
   {
-    if (p_src && is_background_transaction(*p_src))
+    if (p_src &&
+       is_background_transaction(*p_src) &&
+       is_logical_type(ext.get_type())) {
       return;
+    }
     if (ext.is_stable_clean() && !ext.is_placeholder()) {
       lru.move_to_top(ext);
     }