Skip to content

kswapd vs compaction improvements

Rik van Riel linux-mm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 8 repliesIn review
  2. v23 patches 10 repliesSuperseded
  3. v12 patches 5 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm: reclaim at order 0 when compaction is enabledmm/vmscan.c+29 -146 replies
2/3mm: kswapd carefully call compactioninclude/linux/compaction.h mm/compaction.c mm/vmscan.c+50 -181 reply
3/3mm: only defer compaction for failed order and higherinclude/linux/compaction.h include/linux/mmzone.h mm/compaction.c +2 more+27 -81 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMel Gorman
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 -mm 0/3] kswapd vs compaction improvements

Running a kernel with compaction enabled with some memory pressure has caused my system to run into all kinds of trouble.

One of the more obvious problems is that while kswapd does not try to free contiguous pages when CONFIG_COMPACTION is enabled, it does continue reclaiming until enough contiguous pages have become available. This can lead to enormous swap storms, where lots of memory is freed and a fair amount of the working set can end up in swap.

A second problem is that memory compaction currently does nothing for network allocations in the receive path, for eg. jumbo frames, because those are done in interrupt context. In the past we have tried to have kswapd invoke memory compaction, but it used too much CPU time. The second patch in this series has kswapd invoke compaction very carefully, taking in account the desired page order, as well as zone->compaction_deferred.

I have tested these patches on my system, and things seem to behave well. Any tests and reviews would be appreciated.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>