Skip to content

debug explicit GFP_NO{FS,IO} usage from the scope context

Michal Hocko ceph-devel cluster-devel linux-btrfs linux-ext4 linux-f2fs-devel linux-fsdevel linux-mm linux-mtd linux-nfs linux-xfs lkml reiserfs-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm, debug: report when GFP_NO{FS,IO} is used explicitly from memalloc_no{fs,io}_{save,restore} contextinclude/linux/sched.h include/linux/slab.h mm/page_alloc.c+73 -20 replies
2/2silent warnings which we cannot do anything aboutfs/buffer.c include/linux/sched.h mm/page_alloc.c+18 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [DEBUG PATCH 0/2] debug explicit GFP_NO{FS,IO} usage from the scope context

These two patches should help to identify explicit GFP_NO{FS,IO} usage from withing a scope context and reduce such a usage as a result. Such a usage can be changed to the full GFP_KERNEL because all the calls from within the NO{FS,IO} scope will drop the __GFP_FS resp. __GFP_IO automatically and if the function is called outside of the scope then we do not need to restrict it to NOFS/NOIO as long as all the reclaim recursion unsafe contexts are marked properly. This means that each such a reported allocation site has to be checked before converted.

The debugging has to be enabled explicitly by a kernel command line parameter and then it reports the stack trace of the allocation and also the function which has started the current scope.

These two patches are _not_ intended to be merged and they are only aimed at debugging.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>