Page MenuHomeFreeBSD

NVME trim stuff.
ClosedPublic

Authored by imp on Jul 16 2018, 5:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 24 2024, 3:32 AM
Unknown Object (File)
Apr 20 2024, 6:20 PM
Unknown Object (File)
Mar 31 2024, 3:16 AM
Unknown Object (File)
Feb 26 2024, 9:31 PM
Unknown Object (File)
Jan 2 2024, 1:22 PM
Unknown Object (File)
Dec 19 2023, 7:50 AM
Unknown Object (File)
Nov 27 2023, 5:33 PM
Unknown Object (File)
Nov 18 2023, 5:15 PM
Subscribers

Details

Reviewers
imp
Group Reviewers
cam
Summary

Implmement read bias for TRIMs as well.

Use current_read_bias to defer TRIMs for a bit.

Add rate limiters to TRIM.

Given the plans we have for this, we may need to implement partial
IOPs per I/O quantum.

Tweak the ddb show cam iosched command a bit.

For each of the different queue types, list the name of the
queue. While it can be worked out from context, this makes it more
useful and clearer.

Sponsored by: Netflix

Eliminate the TRIM_ACTIVE flag.

Rather than a trim active flag, have a counter that can be used to
have a absolute limit on the number of trims in flight independent of
any I/O limiting factors.

Add BIO_SPEEDUP

Add BIO_SPEEDUP bio command and g_io_speedup wrapper. It tells the
lower layers that the upper layers are dealing with some shortage
(dirty pages and/or disk blocks). The lower layers should do what they
can to speed up anything that's been delayed.

The first use will be to tell the CAM I/O scheduler that any TRIM
shaping should be short-circuited because the system needs
blocks. We'll also call it when there's too many resources used by
UFS.

Add BIO_SPEEDUP signalling to UFS

When we have a resource shortage in UFS, send down a BIO_SPEEDUP to
give the CAM I/O scheduler a heads up that we have a resource shortage
and that it should bias its decisions knowing that.

Implement bio_speedup

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18076
Build 17815: arc lint + arc unit

Event Timeline

chuck added inline comments.
sys/cam/cam_iosched.c
1210

Typo: guessing "wo" should be "do"

1358

Would it make sense to only update last_trim_tick in either cam_iosched_submit_trim() or cam_iosched_trim_done()? It seems like calling cam_iosched_next_trim() and cam_iosched_put_back_trim() could result in the TRIM timeout being pushed out. Moving the update, to submit or done would preserve the "this TRIM command has been pending for a while now" state.

This revision is now accepted and ready to land.Jul 10 2021, 4:14 PM