-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
io_uring: Add 'readfua' and 'writefua' options #1761
io_uring: Add 'readfua' and 'writefua' options #1761
Conversation
I seem to be missing something here, because who actually acts on the FUA being set? I just see the option being checked and it added to the io_u, but nothing apart from that. |
Yes the code setting the FUA flag in the NVMe command is missing. |
Sorry for the noise, I missed that one while cleaning up the patch. Will update soon. |
While making it actually work, please also consider setting CDW12 flags at setup time. Then the command side setup can be simply cmd->cdw12 |= o->cdw12_flags; or something like that, rather than having pretty ugly: if ((read && readfua) || (write && writefua)) branches in the hot path. May obviously want to split o->cdw12_flags into a read and write side, but could be indexed by ddir or something like that. Anyway, above is obviously just pseudo code, but let's not be lazy and just add branches when it can be done much better. |
I'm not sure that I'm properly understand what you meant, but do you mean to add 'cdw12_flags' as a option to make user give CDW12 actual value? If so, existing dtype and dspec might be overwritten to user-given value. If I miss something here, please let me know :) |
If I understand correctly, Jens is suggesting a way to avoid having Declare |
b155c63
to
51d1564
Compare
I updated the patch applying review comments, but I have a doubt here that It's a good way to add an additional argument to |
engines/io_uring.c
Outdated
@@ -82,11 +82,14 @@ struct ioring_data { | |||
struct cmdprio cmdprio; | |||
|
|||
struct nvme_dsm *dsm; | |||
unsigned int cdw12_flags[DDIR_RWDIR_CNT]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change this to uint32_t
just in case this is ever compiled one day on a platform where int
is not 4 bytes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated, Thanks !
Provide options to set the FUA flag in CDW12 in the NVMe command. FUA affects the internal operation of the NVMe controller and is used for testing. In this patchset we expand readfua and writefua options to directly control FUA flag in io_uring_cmd engine. Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
51d1564
to
55e14d7
Compare
We don't want to export |
io_uring: Add 'readfua' and 'writefua' options
Provide options to set the FUA flag in CDW12 in the NVMe command. FUA
affects the internal operation of the NVMe controller and is used for
testing. In this patchset we expand readfua and writefua options to
directly control FUA flag in io_uring_cmd engine.
Signed-off-by: Minwoo Im minwoo.im@samsung.com