diff --git a/third-party/folly/src/folly/io/async/IoUringBackend.cpp b/third-party/folly/src/folly/io/async/IoUringBackend.cpp index 1b780312138d0..02b2895817091 100644 --- a/third-party/folly/src/folly/io/async/IoUringBackend.cpp +++ b/third-party/folly/src/folly/io/async/IoUringBackend.cpp @@ -477,6 +477,9 @@ void IoSqeBase::internalCallback(const io_uring_cqe* cqe) noexcept { if (!(cqe->flags & IORING_CQE_F_MORE)) { inFlight_ = false; } + if (evb_) { + evb_->bumpHandlingTime(); + } if (cancelled_) { callbackCancelled(cqe); } else { diff --git a/third-party/folly/src/folly/io/async/IoUringBackend.h b/third-party/folly/src/folly/io/async/IoUringBackend.h index 873a24aa1a572..fae934d4cdfe9 100644 --- a/third-party/folly/src/folly/io/async/IoUringBackend.h +++ b/third-party/folly/src/folly/io/async/IoUringBackend.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/third-party/folly/src/folly/io/async/IoUringBase.h b/third-party/folly/src/folly/io/async/IoUringBase.h index 61b820e98a90e..9aa3f31c5e074 100644 --- a/third-party/folly/src/folly/io/async/IoUringBase.h +++ b/third-party/folly/src/folly/io/async/IoUringBase.h @@ -27,6 +27,7 @@ struct io_uring_cqe; namespace folly { class IoUringBackend; +class EventBase; struct IoSqeBase : boost::intrusive::list_base_hook< @@ -57,6 +58,7 @@ struct IoSqeBase bool inFlight() const { return inFlight_; } bool cancelled() const { return cancelled_; } void markCancelled() { cancelled_ = true; } + void setEventBase(EventBase* evb) { evb_ = evb; } protected: // This is used if you want to prepare this sqe for reuse, but will manage the @@ -72,6 +74,7 @@ struct IoSqeBase bool inFlight_ = false; bool cancelled_ = false; + EventBase* evb_ = nullptr; Type type_; };