Skip to content

Commit 8588a48

Browse files
committed
Merge branch 'block-6.17' into for-next
* block-6.17: blk-wbt: doc: Update the doc of the wbt_lat_usec interface blk-wbt: Eliminate ambiguity in the comments of struct rq_wb blk-wbt: Optimize wbt_done() for non-throttled writes
2 parents 5eab47a + 0452f08 commit 8588a48

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

Documentation/ABI/stable/sysfs-block

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ Contact: [email protected]
731731
Description:
732732
[RW] If the device is registered for writeback throttling, then
733733
this file shows the target minimum read latency. If this latency
734-
is exceeded in a given window of time (see wb_window_usec), then
734+
is exceeded in a given window of time (see curr_win_nsec), then
735735
the writeback throttling will start scaling back writes. Writing
736736
a value of '0' to this file disables the feature. Writing a
737737
value of '-1' to this file resets the value to the default

block/blk-wbt.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ struct rq_wb {
8585
u64 sync_issue;
8686
void *sync_cookie;
8787

88-
unsigned long last_issue; /* last non-throttled issue */
89-
unsigned long last_comp; /* last non-throttled comp */
88+
unsigned long last_issue; /* issue time of last read rq */
89+
unsigned long last_comp; /* completion time of last read rq */
9090
unsigned long min_lat_nsec;
9191
struct rq_qos rqos;
9292
struct rq_wait rq_wait[WBT_NUM_RWQ];
@@ -248,13 +248,14 @@ static void wbt_done(struct rq_qos *rqos, struct request *rq)
248248
struct rq_wb *rwb = RQWB(rqos);
249249

250250
if (!wbt_is_tracked(rq)) {
251-
if (rwb->sync_cookie == rq) {
252-
rwb->sync_issue = 0;
253-
rwb->sync_cookie = NULL;
254-
}
251+
if (wbt_is_read(rq)) {
252+
if (rwb->sync_cookie == rq) {
253+
rwb->sync_issue = 0;
254+
rwb->sync_cookie = NULL;
255+
}
255256

256-
if (wbt_is_read(rq))
257257
wb_timestamp(rwb, &rwb->last_comp);
258+
}
258259
} else {
259260
WARN_ON_ONCE(rq == rwb->sync_cookie);
260261
__wbt_done(rqos, wbt_flags(rq));

0 commit comments

Comments
 (0)