-
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
fdp: support scheme placement id selection #1757
Conversation
Hyunwoo, although Ankit and I have shared feedback on your patch, it's not appropriate to include our Signed-off-by tags on your scheme patch since we are not co-authors. Please update the commit message to remove the tags for Ankit and me. For patches accepted via the mailing list maintainers add a Signed-off-by after accepting the patch but those should not be added by the patch authors. For more details see https://www.kernel.org/doc/html/latest/process/submitting-patches.html?highlight=signed%20off. |
b07d572
to
d70c81c
Compare
Vincent, I updated messages for commit as well as PR in accordance with your guide. |
t/nvmept_fdp.py
Outdated
"bs": 4096, | ||
"io_size": 4096, | ||
"verify": "crc32c", | ||
"fdp": 1, |
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.
This test is identical to the previous one.
"fdp": 1,"
should be "dataplacement": "fdp"
"fdp_pli": 3
should be "plids": 3
When I run the test against a QEMU FDP device I see:
This is the relevant part of my QEMU invocation:
|
t/nvmept_fdp.py
Outdated
"rw": 'randwrite', | ||
"bs": 4096, | ||
"size": 1048576, | ||
"io_size": 1073741824, |
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.
Consider making this just a very simple test with a single write to each of the PLIDs.
Something along these lines:
"io_size": 3*4096,
"rw": `write:524288`,
Fio will issue sequential write operations with a 524288-byte hole between each write. Then you should end up with a single write to each PLID.
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.
Simplifying the test would be great.
FYI, there was an issue which gets me to make tests a bit complex. I figured out that the test assumes that ruamw
decreases whenever a write occurs on plids. In my case, I ran the test against a real device supporting FDP. But the device did not work in that way. (※ ruamw
decreases after multiple writes occur and the FIO_FDP_MAX_RUAMW
was large enough, 1,571,328)
In your test environment, ruamw
of 1
, 2
, and 3
may be updated (io_size/bs
=262,144, multiple of 32) times in total. The result value of ruamw
, 32, can be accepted as a wrong value even though the value is correct. Simplifying the test can also resolve the failure of the test.
@vincentkfu, 400 & 401 tests are simplified including some bug-fixes. |
Please squash the final two patches. The test still does not work. The code assumes that each of the listed PLIDs will be touched but that's not the case. Fio will write 64K with holes of size 64K between each write. With these contents for
plid 0 will receive one write but plid 2 will receive two writes.
|
Oh, I actually didn't appreciate this originally. Wouldn't it be easier for the scheme file to provide the placement indices directly? I now see that the scheme file provides indices to be used to select from the placement ids listed in the Why not just use the indices in the scheme file directly as placement ID indices? Then when |
In fact, from the point of view of using the index, I was in the same position as you, but I chose this method because I copied the methods of random & RR. As you said, I agree that dealing with the index may cause confusion in the case of the scheme. I'll update the code by directly assigning
|
cfecd30
to
246231a
Compare
There actually is a problem with
The problem is in
The original code did not anticipate this usage of the |
dataplacement.c
Outdated
unsigned long long offset = io_u->offset; | ||
int i; | ||
|
||
for (i = 0; i < ruhs_scheme->nr_schemes; i++){ |
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.
space between ) and {
dataplacement.c
Outdated
|
||
for (i = 0; i < ruhs_scheme->nr_schemes; i++){ | ||
if (offset >= ruhs_scheme->scheme_entries[i].start_offset && | ||
offset < ruhs_scheme->scheme_entries[i].end_offset){ |
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.
space between ) and {
fio.1
Outdated
@@ -2307,6 +2312,31 @@ jobs. If you want fio to use placement identifier only at indices 0, 2 and 5 | |||
specify, you would set `plids=0,2,5`. For streams this should be a | |||
comma-separated list of Stream IDs. | |||
.TP | |||
.BI (io_uring_cmd,xnvme)\fR\fBdp_scheme\fP=filename |
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.
This should be dp_scheme=str
instead of filename
.
options.c
Outdated
.name = "dp_scheme", | ||
.lname = "Data Placement Scheme", | ||
.type = FIO_OPT_STR_STORE, | ||
.cb = str_dp_scheme_cb, |
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 line up the =
with the others ones.
HOWTO.rst
Outdated
@@ -2541,6 +2545,26 @@ with the caveat that when used on the command line, they must come after the | |||
identifiers only at indices 0, 2 and 5 specify ``plids=0,2,5``. For | |||
streams this should be a comma-separated list of Stream IDs. | |||
|
|||
.. option:: dp_scheme=filename : [io_uring_cmd] [xnvme] |
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.
This should be dp_scheme=str
instead of filename.
3a5c4e6
to
96566b0
Compare
Add a new placement id selection method called scheme. It allows users to assign a placement ID (index) depending on the offset range. The strategy of the scheme is specified in the file by user and is applicable using the option dp_scheme. Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
- 302/303: invalid options tests - 400/401: check whether fdp scheme works properly Signed-off-by: Hyunwoo Park <dshw.park@samsung.com>
fdp: support scheme placement id (index) selection
Add a new placement id selection method called scheme. It allows
users to assign a placement ID (index) depending on the offset range.
The strategy of the scheme is specified in the file by user and
is applicable using the option dp_scheme.
Signed-off-by: Hyunwoo Park dshw.park@samsung.com
t/nvmept_fdp: add tests(302,303,400,401) for fdp scheme
Signed-off-by: Hyunwoo Park dshw.park@samsung.com