Re: [linus:master] [mm] 99fbb6bfc1: will-it-scale.per_process_ops -4.7% regression

From: Matthew Wilcox
Date: Thu Mar 14 2024 - 23:32:28 EST


On Fri, Mar 15, 2024 at 11:07:58AM +0800, kernel test robot wrote:
> kernel test robot noticed a -4.7% regression of will-it-scale.per_process_ops on:
>
> commit: 99fbb6bfc16f202adc411ad5d353db214750d121 ("mm: make folios_put() the basis of release_pages()")

I was kind of hoping you'd report this before it hit Linus' tree ...
I did post it last August without any response from the bot, and it's
been in Andrew's tree for a couple of weeks. Is there a better way
to draw the attention of the performance bots?

> testcase: will-it-scale
> test machine: 104 threads 2 sockets (Skylake) with 192G memory
> parameters:
>
> nr_task: 100%
> mode: process
> test: page_fault2

OK, this makes sense. mmap(128MB, MAP_PRIVATE), write to all the pages,
then unmap them. That's going to throw 32k pages at the page freeing
path.

Can you add this patch and rerun the test?

diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h
index 87cc678adc85..67f10b8810a8 100644
--- a/include/linux/pagevec.h
+++ b/include/linux/pagevec.h
@@ -11,8 +11,8 @@

#include <linux/types.h>

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

struct folio;