Commit 2d900ef
mm/migrate: fix sleep in atomic for large folios and buffer heads
The large folio + buffer head noref migration scenarios are
being naughty and blocking while holding a spinlock.
As a consequence of the pagecache lookup path taking the
folio lock this serializes against migration paths, so
they can wait for each other. For the private_lock
atomic case, a new BH_Migrate flag is introduced which
enables the lookup to bail.
This allows the critical region of the private_lock on
the migration path to be reduced to the way it was before
ebdf4de ("mm: migrate: fix reference check race
between __find_get_block() and migration"), that is covering
the count checks.
The scope is always noref migration.
Reported-by: kernel test robot <[email protected]>
Reported-by: [email protected]
Closes: https://lore.kernel.org/oe-lkp/[email protected]
Fixes: 3c20917 ("block/bdev: enable large folio support for large logical block sizes")
Reviewed-by: Jan Kara <[email protected]>
Co-developed-by: Luis Chamberlain <[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] # [0] [1]
Reviewed-by: Luis Chamberlain <[email protected]>
Signed-off-by: Christian Brauner <[email protected]>1 parent 6e8f57f commit 2d900ef
File tree
4 files changed
+19
-5
lines changed- fs
- ext4
- include/linux
- mm
4 files changed
+19
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
| |||
1390 | 1399 | | |
1391 | 1400 | | |
1392 | 1401 | | |
1393 | | - | |
| 1402 | + | |
| 1403 | + | |
1394 | 1404 | | |
1395 | 1405 | | |
1396 | 1406 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
| 695 | + | |
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
848 | | - | |
| 848 | + | |
849 | 849 | | |
850 | 850 | | |
| 851 | + | |
| 852 | + | |
851 | 853 | | |
852 | 854 | | |
853 | 855 | | |
| |||
859 | 861 | | |
860 | 862 | | |
861 | 863 | | |
| 864 | + | |
862 | 865 | | |
863 | 866 | | |
864 | 867 | | |
865 | 868 | | |
866 | 869 | | |
867 | | - | |
868 | 870 | | |
869 | 871 | | |
870 | 872 | | |
| |||
883 | 885 | | |
884 | 886 | | |
885 | 887 | | |
886 | | - | |
| 888 | + | |
887 | 889 | | |
888 | 890 | | |
889 | 891 | | |
| |||
0 commit comments