On Thu 09-04-20 23:38:13, Guoqing Jiang wrote: [...] > Not know memalloc_noio_{save,restore} well, but I guess it is better > to use them to mark a small scope, just my two cents. This would go against the intentio of the api. It is really meant to define reclaim recursion problematic scope. If there is a clear entry point where any further allocation recursing to FS/IO could deadlock then it should be used at that level. This might be a lock which is taken from the reclaim or like this case a device is suspended and no IO is processed so anything that would wait for an IO or rely on IO making progress in the reclaim path would deadlock. Please have a look at Documentation/core-api/gfp_mask-from-fs-io.rst and let me know is something could be made more clear or explicit. I am more than happy to improve the documentation. -- Michal Hocko SUSE Labs