Skip to content

Commit 9cecde8

Browse files
Matthew Wilcox (Oracle)akpm00
Matthew Wilcox (Oracle)
authored andcommitted
mm: increase folio batch size
On a 104 thread, 2 socket Skylake system, Intel report a 4.7% performance reduction with will-it-scale page_fault2. This was due to reducing the size of the batch from 32 to 15. Increasing the folio batch size from 15 to 31 gives a performance increase of 12.5% relative to the original, or 17.2% relative to the reduced performance commit. The penalty of this commit is an additional 128 bytes of stack usage. Six folio_batches are also allocated from percpu memory in cpu_fbatches so that will be an additional 768 bytes of percpu memory (per CPU). Tim Chen originally submitted a patch like this in 2020: https://lore.kernel.org/linux-mm/d1cc9f12a8ad6c2a52cb600d93b06b064f2bbc57.1593205965.git.tim.c.chen@linux.intel.com/ Link: https://lkml.kernel.org/r/[email protected] Fixes: 99fbb6b ("mm: make folios_put() the basis of release_pages()") Signed-off-by: Matthew Wilcox (Oracle) <[email protected]> Tested-by: Yujie Liu <[email protected]> Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Andrew Morton <[email protected]>
1 parent 7844c01 commit 9cecde8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/pagevec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include <linux/types.h>
1313

14-
/* 15 pointers + header align the folio_batch structure to a power of two */
15-
#define PAGEVEC_SIZE 15
14+
/* 31 pointers + header align the folio_batch structure to a power of two */
15+
#define PAGEVEC_SIZE 31
1616

1717
struct folio;
1818

0 commit comments

Comments
 (0)