Skip to content

replay: writes do not invalidate speculatively prefetched chunks #4

Description

@echemythia

In chunk mode, ibm::to_blocks emits write invalidations only for chunk ids that a DEMAND
read has already touched. A chunk that is resident only because a prefetcher speculatively
inserted it is never named, so it survives a write to its object and can later be served as
a hit from data the write replaced.

to_blocks cannot fix this on its own: it transforms the trace and has no visibility into
what a downstream predictor put into a simulator it never touches. The residual hole is
documented in its doc comment.

Suggested fix

Invalidate by object PREFIX in the caches rather than by exact chunk id — on a write to
k, drop k and every resident k#N.

This has to be done across ALL the cache implementations at once (sim::Sim, arc::Arc,
s3fifo::S3Fifo, and hybrid's pools), because each has its own invalidate path. Fixing
one alone would make otherwise-comparable rows in the same per-policy table disagree on
this axis, which is worse than the current consistent limitation.

Affected

crates/s3tap-replay/src/ibm.rs, sim.rs, arc.rs, s3fifo.rs, hybrid.rs,
driver.rs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingknown-limitationAccepted limitation documented for usersreplayOffline replay, cache and prefetch modeling

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions