New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osd: Handle oncommits and wait for future work items from mClock queue #47216
Conversation
When a worker thread with the smallest thread index waits for future work items from the mClock queue, oncommit callbacks are called. But after the callback, the thread has to continue waiting instead of returning back to the ShardedThreadPool::shardedthreadpool_worker() loop. Returning results in the threads with the smallest index across all shards to busy loop causing very high CPU utilization. The fix involves reacquiring the shard_lock and waiting on sdata_cond until notified or until time period lapses. After this, the smallest thread index repopulates the oncommit queue from the context_queue if there were any additions. Fixes: https://tracker.ceph.com/issues/56530 Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
|
@sseshasa can you please attach a link to your before/after CPU utilization comparison plots to this PR? |
|
This looks right, though ShardedOpWQ::_process has become rather tough to follow. |
|
jenkins test windows |
|
Teuthology Test (Rados suite) Summary Unrelated Failures
A handful of failures were due to test infra issues. |




When a worker thread with the smallest thread index waits for future work
items from the mClock queue, oncommit callbacks are called. But after the
callback, the thread has to continue waiting instead of returning back to
the ShardedThreadPool::shardedthreadpool_worker() loop. Returning results
in the threads with the smallest index across all shards to busy loop
causing very high CPU utilization.
The fix involves reacquiring the shard_lock and waiting on sdata_cond
until notified or until time period lapses. After this, the smallest
thread index repopulates the oncommit queue from the context_queue
if there were any additions.
Fixes: https://tracker.ceph.com/issues/56530
Signed-off-by: Sridhar Seshasayee sseshasa@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows