]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/osd_operation: yield the cpu before another round the 56806/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Sun, 21 Apr 2024 04:41:29 +0000 (12:41 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 29 Apr 2024 09:27:21 +0000 (17:27 +0800)
"with_throttle"

This is to avoid infinite recursive calling to "with_throttle_while"

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/osd_operation.h

index b379d4515c1d9a0f7bf1623c945d5d4b9c95deee..6c420f2cc2f96459aba093fcca6254b8aafff851 100644 (file)
@@ -256,7 +256,10 @@ class OperationThrottler : public BlockerT<OperationThrottler>,
     crimson::osd::scheduler::params_t params,
     F &&f) {
     return with_throttle(op, params, f).then([this, params, op, f](bool cont) {
-      return cont ? with_throttle_while(op, params, f) : seastar::now();
+      return cont
+       ? seastar::yield().then([params, op, f, this] {
+         return with_throttle_while(op, params, f); })
+       : seastar::now();
     });
   }