Skip to content

td_io_getevents() does not reset the queue length when call td->io_ops->commit() #2052

@dennis-cher-chang

Description

@dennis-cher-chang

Description of the bug:
When td_io_getevents() is called with min > 0, it will call commit() without updating io_u_in_flight and resetting io_u_queued.

It does not affect the functionality because these counters will be eventually reconciled at wait_for_completions() . However, the throughput might be impacted as it waits at wait_for_completions() unnecessary.

void td_io_commit(struct thread_data *td)
{
	io_u_mark_depth(td, td->io_u_queued);

	if (td->io_ops->commit) {
		ret = td->io_ops->commit(td);
	}

    // td_io_getevents() calls io_ops->commit() explicitly
    // without updating io_u_in_flight and reseting io_u_queued as follows.
	td->io_u_in_flight += td->io_u_queued;
	td->io_u_queued = 0;
}

fio version: 3.41

Reproduction steps
Make td_io_getevents() with min > 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions