Re: [PATCH v3 12/13] mm: Add sysctl vm.compress-batching switch for compress batching during swapout.
From: Andrew Morton
Date: Wed Nov 06 2024 - 15:18:04 EST
On Wed, 6 Nov 2024 11:21:04 -0800 Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx> wrote:
> extern int sysctl_legacy_va_layout;
> +extern unsigned int compress_batching;
nit: I suggest calling this "sysctl_compress_batching". See how we
treated sysctl_legacy_va_layout.
> --- a/mm/swap.c
> +++ b/mm/swap.c
> @@ -47,6 +47,9 @@
> int page_cluster;
> const int page_cluster_max = 31;
>
> +/* Enable/disable compress batching during swapout. */
> +unsigned int compress_batching;
> +
> struct cpu_fbatches {
> /*
> * The following folio batches are grouped together because they are protected
> @@ -1074,4 +1077,7 @@ void __init swap_setup(void)
> * Right now other parts of the system means that we
> * _really_ don't want to cluster much more
> */
> +
> + /* Disable compress batching during swapout by default. */
> + compress_batching = 0;
Not really needed? The compiler already did that.
> }