Re: [PATCH] squashfs: enable __GFP_FS in ->readpage to prevent hang in mem alloc

From: Michal Hocko
Date: Tue Dec 18 2018 - 06:32:35 EST


On Tue 18-12-18 14:06:11, Hou Tao wrote:
[...]
> In my understanding (correct me if I am wrong), there are three ways through which
> reclamation will invoked fs related code and may cause dead-lock:
>
> (1) write-back dirty pages. Not possible for squashfs.

only from kswapd context. So not relevant to OOM killer/

> (2) the reclamation of inodes & dentries. The current file is in-use, so it will be not
> reclaimed, and for other reclaimable inodes, squashfs_destroy_inode() will
> be invoked and it doesn't take any locks.

There are other inodes, not only those in use. Do you use any locks that
could be taken from an inode teardown?
--
Michal Hocko
SUSE Labs