Commit c4eda7e
block/cfq: cache rightmost rb_node
commit f0f1a45f95e85a8ac28c4d62bf2a84db0799efab upstream.
For the same reasons we already cache the leftmost pointer, apply the same
optimization for rb_last() calls. Users must explicitly do this as
rb_root_cached only deals with the smallest node.
[dave@stgolabs.net: brain fart #1]
Link: http://lkml.kernel.org/r/20170731155955.GD21328@linux-80c1.suse
Link: http://lkml.kernel.org/r/20170719014603.19029-18-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
Signed-off-by: mydongistiny <jaysonedson@gmail.com>
Change-Id: If8cf333c3c269b16fc577dc139a2f6bb7d60671c
Signed-off-by: mydongistiny <jaysonedson@gmail.com>1 parent 9e1ec29 commit c4eda7e
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
1182 | 1184 | | |
1183 | 1185 | | |
1184 | 1186 | | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
1185 | 1190 | | |
1186 | 1191 | | |
1187 | 1192 | | |
| |||
1238 | 1243 | | |
1239 | 1244 | | |
1240 | 1245 | | |
1241 | | - | |
| 1246 | + | |
1242 | 1247 | | |
1243 | 1248 | | |
1244 | 1249 | | |
1245 | 1250 | | |
1246 | 1251 | | |
1247 | | - | |
| 1252 | + | |
1248 | 1253 | | |
1249 | | - | |
| 1254 | + | |
| 1255 | + | |
1250 | 1256 | | |
1251 | 1257 | | |
1252 | 1258 | | |
1253 | 1259 | | |
1254 | 1260 | | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1255 | 1264 | | |
1256 | 1265 | | |
1257 | 1266 | | |
| |||
1354 | 1363 | | |
1355 | 1364 | | |
1356 | 1365 | | |
1357 | | - | |
| 1366 | + | |
1358 | 1367 | | |
1359 | 1368 | | |
1360 | 1369 | | |
| |||
2027 | 2036 | | |
2028 | 2037 | | |
2029 | 2038 | | |
2030 | | - | |
| 2039 | + | |
2031 | 2040 | | |
2032 | 2041 | | |
2033 | 2042 | | |
| |||
0 commit comments