Skip to content
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

nvme: Add support for dsm command latency option #2237

Closed
wants to merge 1 commit into from

Conversation

ikegami-t
Copy link
Contributor

The purpose to add is for adding performance statistics. Currently the latency option is only added for passthru() and submit_io(). The verbose option also outputs the latency but other debuging info. So add for the dsm command also to output only the latency info.

@ikegami-t ikegami-t force-pushed the nvme-dsm-latency-2 branch from 8803b79 to 0822641 Compare March 11, 2024 15:44
err = nvme_dsm(&args);
gettimeofday(&end_time, NULL);
if (cfg.latency)
printf(" latency: %s: %llu us\n", __func__, elapsed_utime(start_time, end_time));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be more desirable to call gettimeofday() only when it's needed.

	if (cfg.latency)
		gettimeofday(&start_time, NULL);
	err = nvme_dsm(&args);
	if (cfg.latency) {
		gettimeofday(&end_time, NULL);
		printf(" latency: %s: %llu us\n", __func__, elapsed_utime(start_time, end_time));
	}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your comment. Just fixed as mentioned. By the way both submit_io() and passthru() also may be needed to fix as same.

The purpose to add is for adding performance statistics.
Currently the latency option is only added for passthru() and submit_io().
The verbose option also outputs the latency but other debuging info.
So add for the dsm command also to output only the latency info.

Signed-off-by: Tokunori Ikegami <[email protected]>
@ikegami-t ikegami-t force-pushed the nvme-dsm-latency-2 branch from 0822641 to fb786a2 Compare March 11, 2024 16:09
@igaw
Copy link
Collaborator

igaw commented Mar 12, 2024

This is already available via increasing the verbosity level to debug. All ioctl are intercepted and when the verbosity level is set to debug it measures the the latency.

@igaw igaw closed this Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants