Conversation
The media layer carries a program/erase suspend model: a read that finds its LUN mid-P/E starts after a suspend overhead instead of waiting the operation out, and the suspended operation resumes after the read. Nothing could use it. The two fields, policy.pe_suspend and timing.tsusp_ns, had no device property and no controller set them, and the branch sat only in the staged channel path, which is opt-in and off in the default configuration. Every read on a busy LUN queued behind whatever the LUN was doing. For the plain gates that is a full line of garbage collection. bbssd puts a line's copies and erases on all its LUNs at once, so one GC holds every LUN for the length of the burst (about 90 ms with a 64-LUN line at 40/200 us and 2 ms erase) and a host read arriving during it waits for the rest of the burst. Real controllers localize collection and suspend the array for host reads, and the model FEMU already had written down does exactly that. Apply the same arithmetic on the plain gates: on the lock-free LUN gate inside the CAS loop, and on the plane and lun+plane gates by pushing back each timeline that was busy at the read's arrival. Only reads preempt; programs and erases still queue. Expose the knobs as pe_suspend / tsusp_ns (bbssd) and zns_pe_suspend / zns_tsusp_ns (ZNS), named like the other timing knobs, both off by default, so existing configurations stay bit-identical. A negative ZNS overhead is refused at realize like the other ZNS timing values. In an F2FS multi-device YCSB-A run whose CNS share put the device into sustained line GC, the same run with reads preempting GC kept the GC copy volume (263-318 GB per run) and recovered throughput from -24% to -2% of the no-GC configuration, with the mean read latency back at its no-GC value. The unit test covers off, the LUN gate, the plane gate, that a program does not preempt, and the staged path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
nand-media.calready has a program/erase suspend model (policy.pe_suspend,timing.tsusp_ns: a read that finds its LUN mid-P/E starts after a suspend overhead and the P/E resumes after it, as NAND P/E suspension does, cf. Wu & He, FAST '12). Nothing could use it: no device property set the fields, and the branch existed only in the opt-in staged channel path. On the default gates every read on a busy LUN queues behind whatever the LUN is doing, and for bbssd that is a whole line GC, which parks all 64 LUNs for one burst (~56 ms here) and any read that lands in it.This applies the same arithmetic on the plain gates (the lock-free LUN gate and the plane / lun+plane gates) and exposes the knobs:
pe_suspend/tsusp_nsfor bbssd,zns_pe_suspend/zns_tsusp_nsfor ZNS. Only reads preempt. Both default to off, so existing configurations are bit-identical; README lists the knobs.bbssd, 8ch × 8 LUN, 40/200 µs, 2 ms erase, op 25 %, aged by two full sequential passes; 4 KiB QD1 random reads for 40 s with four QD16 random-write jobs driving GC:
Off, p99 is exactly one GC burst and p99.99 two. On, the same GC runs and the write side is unchanged; a read costs tsusp + tR.
Type of Change
Testing
FEMU Modes Tested
Platform Testing
Checklist