Commit 2c8507c
btrfs: avoid monopolizing a core when activating a swap file
During swap activation we iterate over the extents of a file and we can
have many thousands of them, so we can end up in a busy loop monopolizing
a core. Avoid this by doing a voluntary reschedule after processing each
extent.
CC: [email protected] # 5.4+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Filipe Manana <[email protected]>
Signed-off-by: David Sterba <[email protected]>1 parent 9a45022 commit 2c8507c
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10078 | 10078 | | |
10079 | 10079 | | |
10080 | 10080 | | |
| 10081 | + | |
| 10082 | + | |
10081 | 10083 | | |
10082 | 10084 | | |
10083 | 10085 | | |
| |||
0 commit comments