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

Fixes issue where Ki,Mi,Gi,Ti,Pi behave like K,KB etc instead of KiB. #1827

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RobertTheBrucey
Copy link

Fixes issue where Ki,Mi,Gi,Ti,Pi behave like K,KB etc instead of KiB.

Fixes #1618
As described in issue 1618, the Ki,Mi,etc units do not behave as expected. The code in parse.c explicitly handles K,KB and KiB, but not Ki, this results in Ki being implicitly handled by the "K" check. This commit adds explicit handling of Ki,Mi, etc to match the behavior of KiB, MiB, etc.
This change also brings the behaviour in line with the documentation, though the examples have incorrect numbers for TB and have duplicated entries between kb_base=1000 and kb_base=1024.

Sean Ashton [email protected]

As described in issue 1618, the Ki,Mi,etc units do not behave as expected.
The code in parse.c explicitly handles K,KB and KiB, but not Ki,
this results in Ki being implicitly handled by the "K" check.
This commit adds explicit handling of Ki,Mi, etc to match the behavior of
KiB, MiB, etc.
This change also brings the behaviour in line with the documentation,
though the examples have incorrect numbers for TB and have duplicated
entries between kb_base=1000 and kb_base=1024.

Sean Ashton <[email protected]>
@RobertTheBrucey
Copy link
Author

RobertTheBrucey commented Oct 16, 2024

Tested with this jobfile:

[global]
size=2M
ioengine=posixaio

[job-M]
bs=1M

[job-MB]
bs=1MB

[job-Mi]
bs=1Mi

[job-MiB]
bs=1MiB

[job-M-1000]
bs=1M
kb_base=1000

[job-MB-1000]
bs=1MB
kb_base=1000

[job-Mi-1000]
bs=1Mi
kb_base=1000

[job-MiB-1000]
bs=1MiB
kb_base=1000

With results:

job-M: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=posixaio, iodepth=1
job-MB: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=posixaio, iodepth=1
job-Mi: (g=0): rw=read, bs=(R) 977KiB-977KiB, (W) 977KiB-977KiB, (T) 977KiB-977KiB, ioengine=posixaio, iodepth=1
job-MiB: (g=0): rw=read, bs=(R) 977KiB-977KiB, (W) 977KiB-977KiB, (T) 977KiB-977KiB, ioengine=posixaio, iodepth=1
job-M-1000: (g=0): rw=read, bs=(R) 1000kB-1000kB, (W) 1000kB-1000kB, (T) 1000kB-1000kB, ioengine=posixaio, iodepth=1
job-MB-1000: (g=0): rw=read, bs=(R) 1000kB-1000kB, (W) 1000kB-1000kB, (T) 1000kB-1000kB, ioengine=posixaio, iodepth=1
job-Mi-1000: (g=0): rw=read, bs=(R) 1049kB-1049kB, (W) 1049kB-1049kB, (T) 1049kB-1049kB, ioengine=posixaio, iodepth=1
job-MiB-1000: (g=0): rw=read, bs=(R) 1049kB-1049kB, (W) 1049kB-1049kB, (T) 1049kB-1049kB, ioengine=posixaio, iodepth=1

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.

ki/Mi/Gi/etc parsed incorrectly when kb_base=1000
1 participant