From c3565affb35cf6f5c90abfea47a2d20ca08cf59d Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Sun, 21 Apr 2024 12:41:29 +0800 Subject: [PATCH] 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 --- src/crimson/osd/osd_operation.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); }); } -- 2.39.5