1
0
Fork 0
mirror of https://gitlab.com/niansa/libcrosscoro.git synced 2025-03-06 20:53:32 +01:00

io_scheduler inline schedule_fd eventfd bug fix (#82)

The eventfd shutdown_fd was being reset instead of the schedule_fd,
this was causing a 100% cpu churn on scheduling the first task when
in inline mode.  This fixes it, and confirmed the throughput on the
inline scheduler has jumped quite a bit consistently.
This commit is contained in:
Josh Baldwin 2021-04-25 18:45:34 -06:00 committed by GitHub
parent e9b225e42f
commit 310abc18bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -309,7 +309,7 @@ auto io_scheduler::process_scheduled_execute_inline() -> void
// Clear the schedule eventfd if this is a scheduled task.
eventfd_t value{0};
eventfd_read(m_shutdown_fd, &value);
eventfd_read(m_schedule_fd, &value);
// Clear the in memory flag to reduce eventfd_* calls on scheduling.
m_schedule_fd_triggered.exchange(false, std::memory_order::release);