From: Xuehan Xu Date: Sun, 21 Apr 2024 04:41:29 +0000 (+0800) Subject: crimson/osd/osd_operation: yield the cpu before another round the X-Git-Tag: v20.0.0~2061^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F56806%2Fhead;p=ceph.git crimson/osd/osd_operation: yield the cpu before another round the "with_throttle" This is to avoid infinite recursive calling to "with_throttle_while" Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/osd_operation.h b/src/crimson/osd/osd_operation.h index b379d4515c1d9..6c420f2cc2f96 100644 --- a/src/crimson/osd/osd_operation.h +++ b/src/crimson/osd/osd_operation.h @@ -256,7 +256,10 @@ class OperationThrottler : public BlockerT, 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(); }); }