linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Update shuffle documentation to match its current state
@ 2024-04-22 14:18 Maíra Canal
  2024-04-22 15:13 ` David Hildenbrand
  2024-04-24 19:05 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Maíra Canal @ 2024-04-22 14:18 UTC (permalink / raw)
  To: Jonathan Corbet, Andrew Morton, Josh Poimboeuf, Tejun Heo,
	David Hildenbrand, Wei Yang, Michal Hocko, Johannes Weiner,
	Minchan Kim, Huang Ying, Mel Gorman, Dan Williams
  Cc: linux-doc, linux-kernel, linux-mm, kernel-dev, Maíra Canal

Commit 839195352d82 ("mm/shuffle: remove dynamic reconfiguration")
removed the dynamic reconfiguration capabilities from the shuffle page
allocator. This means that, now, we don't have any perspective of an
"autodetection of memory-side-cache" that triggers the enablement of the
shuffle page allocator.

Therefore, let the documentation reflect that the only way to enable
the shuffle page allocator is by setting `page_alloc.shuffle=1`.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
 Documentation/admin-guide/kernel-parameters.txt | 10 ++++------
 mm/Kconfig                                      |  7 +++----
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 902ecd92a29f..924bb8ddd8a8 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4170,13 +4170,11 @@
 
 	page_alloc.shuffle=
 			[KNL] Boolean flag to control whether the page allocator
-			should randomize its free lists. The randomization may
-			be automatically enabled if the kernel detects it is
-			running on a platform with a direct-mapped memory-side
-			cache, and this parameter can be used to
-			override/disable that behavior. The state of the flag
-			can be read from sysfs at:
+			should randomize its free lists. This parameter can be
+			used to enable/disable page randomization. The state of
+			the flag can be read from sysfs at:
 			/sys/module/page_alloc/parameters/shuffle.
+			This parameter is only available if CONFIG_SHUFFLE_PAGE_ALLOCATOR=y.
 
 	page_owner=	[KNL,EARLY] Boot-time page_owner enabling option.
 			Storage of the information about who allocated
diff --git a/mm/Kconfig b/mm/Kconfig
index b1448aa81e15..f30a18a0e37d 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -333,10 +333,9 @@ config SHUFFLE_PAGE_ALLOCATOR
 
 	  While the randomization improves cache utilization it may
 	  negatively impact workloads on platforms without a cache. For
-	  this reason, by default, the randomization is enabled only
-	  after runtime detection of a direct-mapped memory-side-cache.
-	  Otherwise, the randomization may be force enabled with the
-	  'page_alloc.shuffle' kernel command line parameter.
+	  this reason, by default, the randomization is not enabled even
+	  if SHUFFLE_PAGE_ALLOCATOR=y. The randomization may be force enabled
+	  with the 'page_alloc.shuffle' kernel command line parameter.
 
 	  Say Y if unsure.
 
-- 
2.44.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: Update shuffle documentation to match its current state
  2024-04-22 14:18 [PATCH] mm: Update shuffle documentation to match its current state Maíra Canal
@ 2024-04-22 15:13 ` David Hildenbrand
  2024-04-24 19:05 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: David Hildenbrand @ 2024-04-22 15:13 UTC (permalink / raw)
  To: Maíra Canal, Jonathan Corbet, Andrew Morton, Josh Poimboeuf,
	Tejun Heo, Wei Yang, Michal Hocko, Johannes Weiner, Minchan Kim,
	Huang Ying, Mel Gorman, Dan Williams
  Cc: linux-doc, linux-kernel, linux-mm, kernel-dev

On 22.04.24 16:18, Maíra Canal wrote:
> Commit 839195352d82 ("mm/shuffle: remove dynamic reconfiguration")
> removed the dynamic reconfiguration capabilities from the shuffle page
> allocator. This means that, now, we don't have any perspective of an
> "autodetection of memory-side-cache" that triggers the enablement of the
> shuffle page allocator.

IIRC (it's been a while), we never had that autodetection upstream; we 
only had the code in place that would never get called. 839195352d82 
removed that (dead) code.

> 
> Therefore, let the documentation reflect that the only way to enable
> the shuffle page allocator is by setting `page_alloc.shuffle=1`.
> 
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
>   Documentation/admin-guide/kernel-parameters.txt | 10 ++++------
>   mm/Kconfig                                      |  7 +++----
>   2 files changed, 7 insertions(+), 10 deletions(-)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 902ecd92a29f..924bb8ddd8a8 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -4170,13 +4170,11 @@
>   
>   	page_alloc.shuffle=
>   			[KNL] Boolean flag to control whether the page allocator
> -			should randomize its free lists. The randomization may
> -			be automatically enabled if the kernel detects it is
> -			running on a platform with a direct-mapped memory-side
> -			cache, and this parameter can be used to
> -			override/disable that behavior. The state of the flag
> -			can be read from sysfs at:
> +			should randomize its free lists. This parameter can be
> +			used to enable/disable page randomization. The state of
> +			the flag can be read from sysfs at:
>   			/sys/module/page_alloc/parameters/shuffle.
> +			This parameter is only available if CONFIG_SHUFFLE_PAGE_ALLOCATOR=y.
>   
>   	page_owner=	[KNL,EARLY] Boot-time page_owner enabling option.
>   			Storage of the information about who allocated
> diff --git a/mm/Kconfig b/mm/Kconfig
> index b1448aa81e15..f30a18a0e37d 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -333,10 +333,9 @@ config SHUFFLE_PAGE_ALLOCATOR
>   
>   	  While the randomization improves cache utilization it may
>   	  negatively impact workloads on platforms without a cache. For
> -	  this reason, by default, the randomization is enabled only
> -	  after runtime detection of a direct-mapped memory-side-cache.
> -	  Otherwise, the randomization may be force enabled with the
> -	  'page_alloc.shuffle' kernel command line parameter.
> +	  this reason, by default, the randomization is not enabled even
> +	  if SHUFFLE_PAGE_ALLOCATOR=y. The randomization may be force enabled
> +	  with the 'page_alloc.shuffle' kernel command line parameter.
>   
>   	  Say Y if unsure.
>   
Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mm: Update shuffle documentation to match its current state
  2024-04-22 14:18 [PATCH] mm: Update shuffle documentation to match its current state Maíra Canal
  2024-04-22 15:13 ` David Hildenbrand
@ 2024-04-24 19:05 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2024-04-24 19:05 UTC (permalink / raw)
  To: Maíra Canal, Andrew Morton, Josh Poimboeuf, Tejun Heo,
	David Hildenbrand, Wei Yang, Michal Hocko, Johannes Weiner,
	Minchan Kim, Huang Ying, Mel Gorman, Dan Williams
  Cc: linux-doc, linux-kernel, linux-mm, kernel-dev, Maíra Canal

Maíra Canal <mcanal@igalia.com> writes:

> Commit 839195352d82 ("mm/shuffle: remove dynamic reconfiguration")
> removed the dynamic reconfiguration capabilities from the shuffle page
> allocator. This means that, now, we don't have any perspective of an
> "autodetection of memory-side-cache" that triggers the enablement of the
> shuffle page allocator.
>
> Therefore, let the documentation reflect that the only way to enable
> the shuffle page allocator is by setting `page_alloc.shuffle=1`.
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
>  Documentation/admin-guide/kernel-parameters.txt | 10 ++++------
>  mm/Kconfig                                      |  7 +++----
>  2 files changed, 7 insertions(+), 10 deletions(-)

Applied, thanks.

jon


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-24 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-22 14:18 [PATCH] mm: Update shuffle documentation to match its current state Maíra Canal
2024-04-22 15:13 ` David Hildenbrand
2024-04-24 19:05 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox