]> git.baikalelectronics.ru Git - kernel.git/commit
mm: optimise put_pages_list()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 5 Nov 2021 20:37:25 +0000 (13:37 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:35 +0000 (13:30 -0700)
commit8a64e0c511aa1f6ae45081636c35853d1edbbbb3
treef8d25d3f624b0d340bcf325c043b18969033b208
parent6d74aa00d46ba70095371ba5b2cd380dfc9d0ef2
mm: optimise put_pages_list()

Instead of calling put_page() one page at a time, pop pages off the list
if their refcount was too high and pass the remainder to
put_unref_page_list().  This should be a speed improvement, but I have
no measurements to support that.  Current callers do not care about
performance, but I hope to add some which do.

Link: https://lkml.kernel.org/r/20211007192138.561673-1-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swap.c