Skip to content

RFC Recursive reclaim (on __PF_MEMALLOC)

Christoph Lameter linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 57 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Allow reclaim via __GFP_NOMEMALLOC reclaimmm/vmscan.c+19 -30 replies
2/3Use NOMEMALLOC reclaim to allow reclaim if PF_MEMALLOC is setmm/page_alloc.c+11 -00 replies
3/3Test code for PF_MEMALLOC reclaimmm/vmscan.c+44 -10 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC 0/3] Recursive reclaim (on __PF_MEMALLOC)

The following patchset implements recursive reclaim. Recursive reclaim is necessary if we run out of memory in the writeout patch from reclaim.

This is f.e. important for stacked filesystems or anything that does complicated processing in the writeout path.

Recursive reclaim works because it limits itself to only reclaim pages that do not require writeout. It will only remove clean pages from the LRU. The dirty throttling of the VM during regular reclaim insures that the amount of dirty pages is limited. If recursive reclaim causes too many clean pages to be removed then regular reclaim will throttle all processes until the dirty ratio is restored. This means that the amount of memory that can be reclaimed via recursive reclaim is limited to clean memory. The default ratio is 10%. This means that recursive reclaim can reclaim 90% of memory before failing. Reclaiming excessive amounts of clean pages may have a significant performance impact because this means that executable pages will be removed. However, it ensures that we will no longer fail in the writeout path.

A patch is included to test this functionality. The test involved allocating 12 Megabytes from the reclaim paths when __PF_MEMALLOC is set. This is enough to exhaust the reserves.

Signature · 5 lines
--
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>