Skip to content

Add AIO and Direct IO support for IOR phases#104

Draft
jxiong wants to merge 1 commit intoIO500:mainfrom
jxiong:aio_dio_support
Draft

Add AIO and Direct IO support for IOR phases#104
jxiong wants to merge 1 commit intoIO500:mainfrom
jxiong:aio_dio_support

Conversation

@jxiong
Copy link

@jxiong jxiong commented Mar 1, 2026

This commit introduces a set of features and fixes to improve IOR execution flexibility and overall test stability:

IOR Execution Enhancements:

  • Added '--with-aio' to IOR configuration in prepare.sh to enable AIO.
  • Introduced 'direct' option for IOR phases to support '--posix.odirect'.
  • Added 'iteration' option to the IOR easy read phase.

Phase Execution & Validation:

  • Added should_run_phase() check in main.c to properly skip disabled phases.
  • Improved the stonewall condition validation logic in phase_dbg.c.

Bug Fixes:

  • Added CFLAGS="-fPIC" for pfind compilation in prepare.sh.
  • Fixed missing return value validation for fread() in phase_mdworkbench.c.

This commit introduces a set of features and fixes to improve IOR execution
flexibility and overall test stability:

IOR Execution Enhancements:
- Added '--with-aio' to IOR configuration in prepare.sh to enable AIO.
- Introduced 'direct' option for IOR phases to support '--posix.odirect'.
- Added 'iteration' option to the IOR easy read phase.

Phase Execution & Validation:
- Added should_run_phase() check in main.c to properly skip disabled phases.
- Improved the stonewall condition validation logic in phase_dbg.c.

Bug Fixes:
- Added CFLAGS="-fPIC" for pfind compilation in prepare.sh.
- Fixed missing return value validation for fread() in phase_mdworkbench.c.

Signed-off-by: Jinshan Xiong <jinshanx@google.com>
@jxiong jxiong requested a review from a team as a code owner March 1, 2026 00:47
@jxiong jxiong marked this pull request as draft March 5, 2026 04:51
@seattleplus
Copy link
Contributor

Huge thanks for the patch.

I think the "IOR execution" portions of direct, iteration, aio need further discussion and should be separated into a separate PR. The bug fixes and phase execution would also be great if they could be separated into 2 separate PRs.

On the ior execution pieces, the iteration part is not in the spirit of io500 and could bias the results, and so that will not be accepted. We need to discuss the aio portion, as we might prefer for users to just do this another way...but thank you for the example of how to get it done. On the direct, we don't want to add a new var to the function for every new option, so we might think about ways to generalize this, but thanks for the patch as an example of how to get started.

I'm a bit confused as to why should_run_phase is needed?

I'll let the others comment on the other fixes...

@jxiong
Copy link
Author

jxiong commented Mar 5, 2026

For the direct part, I can make it to 'aio --posix.direct' just like the current 'POSIX --posix.direct' does.

iteration is to stabilize the reading result. The publishers will run the whole tests multiple times and pick the best ones anyways, why not make their life easier by embedding this option? I will remove it in the next refresh.

The should_run_phase() is to honor the config options in the ini file. Otherwise it would have this results:

ERROR INVALID (src/main.c:437) Runtime of phase (0.000012) is below stonewall time. This shouldn't happen!
ERROR INVALID (src/main.c:443) Runtime is smaller than expected minimum runtime
[RESULT]    mdtest-hard-write        0.000000 kIOPS : time 0.000 seconds [INVALID]

I agree the fix is not necessary for a valid run but just trying to make it better. In my recent io500 run, I didn't include anything from this patch.

@gflofst
Copy link
Contributor

gflofst commented Mar 11, 2026

@JulianKunkel, can you comment on some of the deeper code changes? We aren't sure about the implications of this.

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.

5 participants