SPRandom Cache Size Behavior Implementation#2044
Conversation
|
@axboe Any chance we can get someone to review this? The Micron team would like to get it merged if everything looks good. |
|
Well, still waiting on @steven-sprouse-sndk to take a look at this. Maybe @tomas-winkler-sndk can help out? Outside of that, you need to have a single commit in your list of commits, you have for some reason merged master back a few times. So please rebase on master. Secondly, your commit should line break at 72 chars or so, the lines are way too long. Third, and this happens all the time for some reason, people confuse the github PR message for the git commit message. Signed-off-by etc should go in the git commit message, it doesn't mean anything in here. |
| free(validity_dist); | ||
| free(spr_info->invalid_pct); | ||
| return -ENOMEM; | ||
| if (validity_dist) |
There was a problem hiding this comment.
You also have a lot of unrelated changes in your commit. A commit should do one thing, and one thing only. These aren't even needed, doing free(NULL) is perfectly valid.
There was a problem hiding this comment.
Removed the unrelated and unnecessary null checks as part of the 2nd commit.
| Enabled by default. | ||
| .TP | ||
| .BI (rbd)rbd_encryption_format \fR=\fPstr | ||
| Specifies the encryption format of the RBD image. Supported values are |
There was a problem hiding this comment.
And same for these - I do agree we should fix white space damage like that, it's a shame that made it into the original. But do these as a separate fix, as they really have nothing at all to do with the change you want to make.
There was a problem hiding this comment.
Removed the unrelated whitespace changes as part of the 2nd commit.
|
Please sort out the review comments I posted. As a bonus, this also makes your main change easier to review. As a submitter, you should always make it as easy as possible for people to review. That increases the likelihood that it does get reviewed, and in turn, applied. |
cc7c433 to
b774517
Compare
|
Don't have changes, and then a revert of some of those changes. If you want to address the whitespace issues, and that would indeed be great, do that first as a separate commit. Then you have a commit with your changes in it. Either that, or you just ignore the whitespace issues in the current documentation. In which case you'd want to squash those two commits into a single commit. And since the last commit is just fixing issues the main commit should've tackled, you should squash those too. |
|
Main commit also still has lines that are way too long, and it's missing a Signed-off-by. The other two do have a Signed-off-by, but no empty line between the commit message and the SOB line. Please use git log or similar in a terminal in the fio git repo to see the expected format. |
|
I was referring to the commit message... See previous comments on that. Please squash everything, it's turning into quite a mess at this point. |
d721433 to
b727ef9
Compare
Thank you for the feedback. I believe I addressed the review comments. Sorry about the mess I haven't used git in some of the requested ways before. So the 3 additional commits should now be squashed into the first, PR is rebased to master, and the only commit here should now have a proper SOB line. |
|
Getting closer! But as mentioned a few times, you commit message needs wrapping at 72 chars, or it's unreadable in normal git log. Just go git commit --amend and re-wrap your commit message at 72 chars, then force push that commit. We still need to review the new commit, but at least then the meta data is sane. |
b727ef9 to
54cde85
Compare
|
Just some minor nits, nothing major. I would still like the sprandom folks to sign off on this addition, which is somewhat orthogonal to the actual code in question. |
Define a new SPRandom variable to allow for an SSD cache size(spr_cs) to be defined. Preserve original SPRandom invalidation behavior if spr_cs is zero(default). If spr_cs is non-zero then region X invalidations are done after region X+1 writes are completed instead of before. This creates an additional region size of distance between the writes and associated invalidations. Return an error if the defined cache size is greater than the region size and tell the user the maximum number of regions supported with the defined cache size. Attempting to resolve axboe#2043 Signed-off-by: Charles Henry <[email protected]>
54cde85 to
546875b
Compare
|
@cachyyyk I understand the proposal and I think it will do what you want. Just to make sure I understand the implementation. You are not requiring any additional data structures, but just the timing of when the first list is replayed is delayed. So the net effect is there will be more memory in use when this new parameter is specified? |
Correct. When spr_cs is non-zero popping from the invalid_buf will not occur until the end of the next region. So we need roughly 2x of the worst case invalidation size worth of space in this buffer to continue to add to the staging portion of the buffer until the commit portion of the buffer is reduced now at the end of the next region. For a 32 TB drive, 100 regions, OP of 15% that would change the total allocation from 145.38 MiB to 290.75 MiB. |
|
@cachyyyk , @vincentkfu I am good with this feature enhancement. |
|
@axboe @steven-sprouse-sndk @vincentkfu Thank you for taking your time to review these changes. |
|
@axboe @steven-sprouse-sndk @vincentkfu A shout out from the Micron team. Great collaboration and engagement! Thank you so much for your helpfulness as we dotted all the i's and crossed all the t's. Appreciate you guys! |
SPRandom Cache Size Behavior Implementation
zero(default).
after region X+1 writes are completed instead of before.
This creates an additional region size of distance between
the writes and associated invalidations.
the region size and tell the user the maximum number of
regions supported with the defined cache size
Attempting to implement #2043