Skip to content

fix: gate Linux-only benchmark examples#8

Merged
houseme merged 2 commits into
mainfrom
docs/readme-changelog
Jul 10, 2026
Merged

fix: gate Linux-only benchmark examples#8
houseme merged 2 commits into
mainfrom
docs/readme-changelog

Conversation

@houseme

@houseme houseme commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Keep streaming_bench and concurrent_pread_bench as the same Cargo example names, but move their Linux implementations behind platform-gated modules.
  • Add small non-Linux entrypoints so cargo check --all-targets succeeds on macOS without importing UringDriver or Linux-only libc flags.
  • Preserve Linux coverage by type-checking both benchmark examples against x86_64-unknown-linux-gnu.

Root Cause

The benchmark examples used Linux-only APIs and rustfs_uring::UringDriver, while the public export and libc dependency are target-gated for Linux. Cargo still compiled the examples on macOS during all-target checks, so the imports failed.

Verification

  • cargo fmt --check
  • cargo check --all-targets
  • cargo check --target x86_64-unknown-linux-gnu --example streaming_bench
  • cargo check --target x86_64-unknown-linux-gnu --example concurrent_pread_bench

houseme and others added 2 commits July 10, 2026 23:45
The README described eventfd reaping, O_DIRECT, and LocalIoBackend
integration as unlanded and listed streaming reads on the roadmap; all of
that has since merged or been closed by measurement. Bring it in line with
the actual public API and record the honest performance picture.

README changes:
- status now reflects that the read path is wired into rustfs/rustfs behind
  a runtime probe and off by default (RUSTFS_IO_URING_READ_ENABLE), and how
  to pin the git dependency;
- document sharded rings (probe_and_start_sharded) and native O_DIRECT
  (read_at_direct) with runnable examples matching the current signatures;
- a "when this crate helps — and when it does not" section reporting the
  measured results, including where io_uring loses (single sequential
  stream, low concurrency) and the roughly-neutral end-to-end S3 GET, plus
  the two benchmarking traps this repo hit (a 76x regression mistaken for a
  win, and page-cache-hit microbenchmarks not transferring end-to-end);
- roadmap trimmed to what is actually open (write path, register_files,
  SQPOLL) with the closed-by-measurement decisions moved to the CHANGELOG.

Add CHANGELOG.md (Keep a Changelog format): every landed change #1..#6 with
the commit that carried it, the pre-history of the audited spike, and a
"decisions recorded, not implemented" section so the NO-GO items are not
silently re-opened.

Verified README claims against source: the six documented signatures match
src/driver.rs, ProbeFailure/StatsSnapshot/UringDriver are the lib exports,
and the O_DIRECT example's alignment passes the driver's validation.

Co-Authored-By: heihutu <heihutu@gmail.com>
@houseme houseme marked this pull request as ready for review July 10, 2026 17:19
@houseme houseme merged commit 0ae8adf into main Jul 10, 2026
3 checks passed
@houseme houseme deleted the docs/readme-changelog branch July 10, 2026 17:19
houseme added a commit that referenced this pull request Jul 10, 2026
Supersedes the earlier "restore README" intent. The maintainer decision is
to make 0.1.0 publish-ready but hold the actual crates.io release, so:

- README: keep the crates.io/docs.rs badges (they go live on release), on
  top of #8's corrected formatting (de-indented O_DIRECT doctest, compact
  table) that #9's stale base had reverted. The Status note now says 0.1.0 is
  publish-ready with `publish = false` held until a maintainer cuts the
  release, rather than "not published".
- Cargo.toml: keep `publish = false` but document that it is a hold, not a
  blocker — metadata is complete and every dependency is on crates.io, so the
  flip-and-`cargo publish` is a one-step maintainer action.
- CHANGELOG: reframe the note the same way and record that the `[Unreleased]`
  section will move under `[0.1.0]` unchanged on release.

No code change; no `cargo publish` performed (that stays a maintainer action
with their token). README/CHANGELOG/Cargo.toml only.

Co-Authored-By: heihutu <heihutu@gmail.com>
houseme added a commit that referenced this pull request Jul 10, 2026
Supersedes the earlier "restore README" intent. The maintainer decision is
to make 0.1.0 publish-ready but hold the actual crates.io release, so:

- README: keep the crates.io/docs.rs badges (they go live on release), on
  top of #8's corrected formatting (de-indented O_DIRECT doctest, compact
  table) that #9's stale base had reverted. The Status note now says 0.1.0 is
  publish-ready with `publish = false` held until a maintainer cuts the
  release, rather than "not published".
- Cargo.toml: keep `publish = false` but document that it is a hold, not a
  blocker — metadata is complete and every dependency is on crates.io, so the
  flip-and-`cargo publish` is a one-step maintainer action.
- CHANGELOG: reframe the note the same way and record that the `[Unreleased]`
  section will move under `[0.1.0]` unchanged on release.

No code change; no `cargo publish` performed (that stays a maintainer action
with their token). README/CHANGELOG/Cargo.toml only.

Co-authored-by: heihutu <heihutu@gmail.com>
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.

1 participant