Commit 7ffe3de
fs/buffer: split locking for pagecache lookups
Callers of __find_get_block() may or may not allow for blocking
semantics, and is currently assumed that it will not. Layout
two paths based on this. The the private_lock scheme will
continued to be used for atomic contexts. Otherwise take the
folio lock instead, which protects the buffers, such as
vs migration and try_to_free_buffers().
Per the "hack idea", the latter can alleviate contention on
the private_lock for bdev mappings. For reasons of determinism
and avoid making bugs hard to reproduce, the trylocking is not
attempted.
No change in semantics. All lookup users still take the spinlock.
Reviewed-by: Jan Kara <[email protected]>
Signed-off-by: Davidlohr Bueso <[email protected]>
Link: https://kdevops.org/ext4/v6.15-rc2.html # [0]
Link: https://lore.kernel.org/all/[email protected]/ # [1]
Link: https://lore.kernel.org/[email protected]
Tested-by: [email protected]
Reviewed-by: Luis Chamberlain <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>1 parent 559a0d7 commit 7ffe3de
1 file changed
+25
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | 179 | | |
190 | | - | |
| 180 | + | |
191 | 181 | | |
192 | 182 | | |
193 | 183 | | |
| |||
204 | 194 | | |
205 | 195 | | |
206 | 196 | | |
207 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
208 | 207 | | |
209 | 208 | | |
210 | 209 | | |
| |||
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
239 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
240 | 242 | | |
241 | 243 | | |
242 | 244 | | |
| |||
1388 | 1390 | | |
1389 | 1391 | | |
1390 | 1392 | | |
1391 | | - | |
1392 | | - | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
1393 | 1396 | | |
1394 | 1397 | | |
1395 | 1398 | | |
1396 | 1399 | | |
1397 | 1400 | | |
1398 | | - | |
| 1401 | + | |
1399 | 1402 | | |
1400 | 1403 | | |
1401 | 1404 | | |
1402 | 1405 | | |
1403 | 1406 | | |
1404 | 1407 | | |
1405 | 1408 | | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
1406 | 1415 | | |
1407 | 1416 | | |
1408 | 1417 | | |
| |||
0 commit comments