mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 23:51:39 +00:00
82e60d00b7
When psi annotations were added to to btrfs compression reads, the psi state tracking over add_ra_bio_pages and btrfs_submit_compressed_read was faulty. A pressure state, once entered, is never left. This results in incorrectly elevated pressure, which triggers OOM kills. pflags record the *previous* memstall state when we enter a new one. The code tried to initialize pflags to 1, and then optimize the leave call when we either didn't enter a memstall, or were already inside a nested stall. However, there can be multiple PageWorkingset pages in the bio, at which point it's that path itself that enters repeatedly and overwrites pflags. This causes us to miss the exit. Enter the stall only once if needed, then unwind correctly. erofs has the same problem, fix that up too. And move the memstall exit past submit_bio() to restore submit accounting originally added by |
||
---|---|---|
.. | ||
compress.h | ||
data.c | ||
decompressor_lzma.c | ||
decompressor.c | ||
dir.c | ||
erofs_fs.h | ||
fscache.c | ||
inode.c | ||
internal.h | ||
Kconfig | ||
Makefile | ||
namei.c | ||
pcpubuf.c | ||
super.c | ||
sysfs.c | ||
tagptr.h | ||
utils.c | ||
xattr.c | ||
xattr.h | ||
zdata.c | ||
zdata.h | ||
zmap.c |