mm: pagevec: defer deciding which LRU to add a page to until pagevec drain time

Linux Kernel / Linux Kernel - Mel Gorman [suse.de] - 3 July 2013 18:07 EDT

mark_page_accessed() cannot activate an inactive page that is located on an inactive LRU pagevec. Hints from filesystems may be ignored as a result. In preparation for fixing that problem, this patch removes the per-LRU pagevecs and leaves just one pagevec. The final LRU the page is added to is deferred until the pagevec is drained.

This means that fewer pagevecs are available and potentially there is greater contention on the LRU lock. However, this only applies in the case where there is an almost perfect mix of file, anon, active and inactive pages being added to the LRU. In practice I expect that we are adding stream of pages of a particular time and that the changes in contention will barely be measurable.

13f7f78 mm: pagevec: defer deciding which LRU to add a page to until pagevec drain time
mm/swap.c | 47 +++++++++++++++++++++--------------------------
1 file changed, 21 insertions(+), 26 deletions(-)

Upstream: git.kernel.org


  • Share