]> Git Repo - linux.git/commit
mm: document memalloc_noreclaim_save() and memalloc_pin_save()
authorVlastimil Babka <[email protected]>
Mon, 12 Feb 2024 18:29:51 +0000 (19:29 +0100)
committerAndrew Morton <[email protected]>
Thu, 22 Feb 2024 18:24:57 +0000 (10:24 -0800)
commitcfb837e8433179995709578ca5b4741adcd54ec7
tree162240701b2cbceeefbd73528b8ad41261633756
parentf576a1e80c3a97ea26b436bc060df42cf6d19026
mm: document memalloc_noreclaim_save() and memalloc_pin_save()

The memalloc_noreclaim_save() function currently has no documentation
comment, so the implications of its usage are not obvious.  Namely that it
not only prevents entering reclaim (as the name suggests), but also allows
using all memory reserves and thus should be only used in contexts that
are allocating memory to free memory.  This may lead to new improper
usages being added.

Thus add a documenting comment, based on the description of
__GFP_MEMALLOC.  While at it, also document memalloc_pin_save() so that
all the memalloc_ scopes are documented.  For those already documented,
add missing Return: descriptions, and mark Context: description per
kernel-docs style guide.

In the comments describing the relevant PF_MEMALLOC flags, refer to their
scope setting functions.

[[email protected]: fix issues that Mike pointed out]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Vlastimil Babka <[email protected]>
Reviewed-by: Mike Rapoport (IBM) <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Kent Overstreet <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Pasha Tatashin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
include/linux/sched.h
include/linux/sched/mm.h
This page took 0.052388 seconds and 4 git commands to generate.