* [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section
@ 2025-10-03 14:32 Gregory Price
2025-10-28 16:01 ` Jonathan Cameron
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gregory Price @ 2025-10-03 14:32 UTC (permalink / raw)
To: linux-cxl
Cc: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams, corbet, gourry,
linux-doc, linux-kernel
The node/zone quirk section of the cxl documentation is incorrect.
The actual reason for fallback allocation misbehavior in the
described configuration is due to a kswapd/reclaim thrashing scenario
fixed by the linked patch. Remove this section.
Link: https://lore.kernel.org/linux-mm/20250919162134.1098208-1-hannes@cmpxchg.org/
Signed-off-by: Gregory Price <gourry@gourry.net>
---
.../cxl/allocation/page-allocator.rst | 31 -------------------
1 file changed, 31 deletions(-)
diff --git a/Documentation/driver-api/cxl/allocation/page-allocator.rst b/Documentation/driver-api/cxl/allocation/page-allocator.rst
index 7b8fe1b8d5bb..3fa584a248bd 100644
--- a/Documentation/driver-api/cxl/allocation/page-allocator.rst
+++ b/Documentation/driver-api/cxl/allocation/page-allocator.rst
@@ -41,37 +41,6 @@ To simplify this, the page allocator will prefer :code:`ZONE_MOVABLE` over
will fallback to allocate from :code:`ZONE_NORMAL`.
-Zone and Node Quirks
-====================
-Let's consider a configuration where the local DRAM capacity is largely onlined
-into :code:`ZONE_NORMAL`, with no :code:`ZONE_MOVABLE` capacity present. The
-CXL capacity has the opposite configuration - all onlined in
-:code:`ZONE_MOVABLE`.
-
-Under the default allocation policy, the page allocator will completely skip
-:code:`ZONE_MOVABLE` as a valid allocation target. This is because, as of
-Linux v6.15, the page allocator does (approximately) the following: ::
-
- for (each zone in local_node):
-
- for (each node in fallback_order):
-
- attempt_allocation(gfp_flags);
-
-Because the local node does not have :code:`ZONE_MOVABLE`, the CXL node is
-functionally unreachable for direct allocation. As a result, the only way
-for CXL capacity to be used is via `demotion` in the reclaim path.
-
-This configuration also means that if the DRAM ndoe has :code:`ZONE_MOVABLE`
-capacity - when that capacity is depleted, the page allocator will actually
-prefer CXL :code:`ZONE_MOVABLE` pages over DRAM :code:`ZONE_NORMAL` pages.
-
-We may wish to invert this priority in future Linux versions.
-
-If `demotion` and `swap` are disabled, Linux will begin to cause OOM crashes
-when the DRAM nodes are depleted. See the reclaim section for more details.
-
-
CGroups and CPUSets
===================
Finally, assuming CXL memory is reachable via the page allocation (i.e. onlined
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section
2025-10-03 14:32 [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section Gregory Price
@ 2025-10-28 16:01 ` Jonathan Cameron
2025-11-03 23:36 ` Jonathan Corbet
2025-11-03 23:41 ` Dave Jiang
2 siblings, 0 replies; 5+ messages in thread
From: Jonathan Cameron @ 2025-10-28 16:01 UTC (permalink / raw)
To: Gregory Price
Cc: linux-cxl, dave, dave.jiang, alison.schofield, vishal.l.verma,
ira.weiny, dan.j.williams, corbet, linux-doc, linux-kernel
On Fri, 3 Oct 2025 10:32:32 -0400
Gregory Price <gourry@gourry.net> wrote:
> The node/zone quirk section of the cxl documentation is incorrect.
> The actual reason for fallback allocation misbehavior in the
> described configuration is due to a kswapd/reclaim thrashing scenario
> fixed by the linked patch. Remove this section.
>
> Link: https://lore.kernel.org/linux-mm/20250919162134.1098208-1-hannes@cmpxchg.org/
> Signed-off-by: Gregory Price <gourry@gourry.net>
Not looked into it in detail but I'll take your word for it that
the text below is wrong.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
> ---
> .../cxl/allocation/page-allocator.rst | 31 -------------------
> 1 file changed, 31 deletions(-)
>
> diff --git a/Documentation/driver-api/cxl/allocation/page-allocator.rst b/Documentation/driver-api/cxl/allocation/page-allocator.rst
> index 7b8fe1b8d5bb..3fa584a248bd 100644
> --- a/Documentation/driver-api/cxl/allocation/page-allocator.rst
> +++ b/Documentation/driver-api/cxl/allocation/page-allocator.rst
> @@ -41,37 +41,6 @@ To simplify this, the page allocator will prefer :code:`ZONE_MOVABLE` over
> will fallback to allocate from :code:`ZONE_NORMAL`.
>
>
> -Zone and Node Quirks
> -====================
> -Let's consider a configuration where the local DRAM capacity is largely onlined
> -into :code:`ZONE_NORMAL`, with no :code:`ZONE_MOVABLE` capacity present. The
> -CXL capacity has the opposite configuration - all onlined in
> -:code:`ZONE_MOVABLE`.
> -
> -Under the default allocation policy, the page allocator will completely skip
> -:code:`ZONE_MOVABLE` as a valid allocation target. This is because, as of
> -Linux v6.15, the page allocator does (approximately) the following: ::
> -
> - for (each zone in local_node):
> -
> - for (each node in fallback_order):
> -
> - attempt_allocation(gfp_flags);
> -
> -Because the local node does not have :code:`ZONE_MOVABLE`, the CXL node is
> -functionally unreachable for direct allocation. As a result, the only way
> -for CXL capacity to be used is via `demotion` in the reclaim path.
> -
> -This configuration also means that if the DRAM ndoe has :code:`ZONE_MOVABLE`
> -capacity - when that capacity is depleted, the page allocator will actually
> -prefer CXL :code:`ZONE_MOVABLE` pages over DRAM :code:`ZONE_NORMAL` pages.
> -
> -We may wish to invert this priority in future Linux versions.
> -
> -If `demotion` and `swap` are disabled, Linux will begin to cause OOM crashes
> -when the DRAM nodes are depleted. See the reclaim section for more details.
> -
> -
> CGroups and CPUSets
> ===================
> Finally, assuming CXL memory is reachable via the page allocation (i.e. onlined
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section
2025-10-03 14:32 [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section Gregory Price
2025-10-28 16:01 ` Jonathan Cameron
@ 2025-11-03 23:36 ` Jonathan Corbet
2025-11-03 23:41 ` Dave Jiang
2025-11-03 23:41 ` Dave Jiang
2 siblings, 1 reply; 5+ messages in thread
From: Jonathan Corbet @ 2025-11-03 23:36 UTC (permalink / raw)
To: Gregory Price, linux-cxl
Cc: dave, jonathan.cameron, dave.jiang, alison.schofield,
vishal.l.verma, ira.weiny, dan.j.williams, gourry, linux-doc,
linux-kernel
Gregory Price <gourry@gourry.net> writes:
> The node/zone quirk section of the cxl documentation is incorrect.
> The actual reason for fallback allocation misbehavior in the
> described configuration is due to a kswapd/reclaim thrashing scenario
> fixed by the linked patch. Remove this section.
>
> Link: https://lore.kernel.org/linux-mm/20250919162134.1098208-1-hannes@cmpxchg.org/
> Signed-off-by: Gregory Price <gourry@gourry.net>
> ---
> .../cxl/allocation/page-allocator.rst | 31 -------------------
> 1 file changed, 31 deletions(-)
This patch is still outstanding...should I take it through docs?
Thanks,
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section
2025-11-03 23:36 ` Jonathan Corbet
@ 2025-11-03 23:41 ` Dave Jiang
0 siblings, 0 replies; 5+ messages in thread
From: Dave Jiang @ 2025-11-03 23:41 UTC (permalink / raw)
To: Jonathan Corbet, Gregory Price, linux-cxl
Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, dan.j.williams, linux-doc, linux-kernel
On 11/3/25 4:36 PM, Jonathan Corbet wrote:
> Gregory Price <gourry@gourry.net> writes:
>
>> The node/zone quirk section of the cxl documentation is incorrect.
>> The actual reason for fallback allocation misbehavior in the
>> described configuration is due to a kswapd/reclaim thrashing scenario
>> fixed by the linked patch. Remove this section.
>>
>> Link: https://lore.kernel.org/linux-mm/20250919162134.1098208-1-hannes@cmpxchg.org/
>> Signed-off-by: Gregory Price <gourry@gourry.net>
>> ---
>> .../cxl/allocation/page-allocator.rst | 31 -------------------
>> 1 file changed, 31 deletions(-)
>
> This patch is still outstanding...should I take it through docs?
I just pushed it to cxl/next this morning. Thanks.
>
> Thanks,
>
> jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section
2025-10-03 14:32 [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section Gregory Price
2025-10-28 16:01 ` Jonathan Cameron
2025-11-03 23:36 ` Jonathan Corbet
@ 2025-11-03 23:41 ` Dave Jiang
2 siblings, 0 replies; 5+ messages in thread
From: Dave Jiang @ 2025-11-03 23:41 UTC (permalink / raw)
To: Gregory Price, linux-cxl
Cc: dave, jonathan.cameron, alison.schofield, vishal.l.verma,
ira.weiny, dan.j.williams, corbet, linux-doc, linux-kernel
On 10/3/25 7:32 AM, Gregory Price wrote:
> The node/zone quirk section of the cxl documentation is incorrect.
> The actual reason for fallback allocation misbehavior in the
> described configuration is due to a kswapd/reclaim thrashing scenario
> fixed by the linked patch. Remove this section.
>
> Link: https://lore.kernel.org/linux-mm/20250919162134.1098208-1-hannes@cmpxchg.org/
> Signed-off-by: Gregory Price <gourry@gourry.net>
Applied to cxl/next
82b5d7e30b24b7df5dbf10aea97292be38daf88d
> ---
> .../cxl/allocation/page-allocator.rst | 31 -------------------
> 1 file changed, 31 deletions(-)
>
> diff --git a/Documentation/driver-api/cxl/allocation/page-allocator.rst b/Documentation/driver-api/cxl/allocation/page-allocator.rst
> index 7b8fe1b8d5bb..3fa584a248bd 100644
> --- a/Documentation/driver-api/cxl/allocation/page-allocator.rst
> +++ b/Documentation/driver-api/cxl/allocation/page-allocator.rst
> @@ -41,37 +41,6 @@ To simplify this, the page allocator will prefer :code:`ZONE_MOVABLE` over
> will fallback to allocate from :code:`ZONE_NORMAL`.
>
>
> -Zone and Node Quirks
> -====================
> -Let's consider a configuration where the local DRAM capacity is largely onlined
> -into :code:`ZONE_NORMAL`, with no :code:`ZONE_MOVABLE` capacity present. The
> -CXL capacity has the opposite configuration - all onlined in
> -:code:`ZONE_MOVABLE`.
> -
> -Under the default allocation policy, the page allocator will completely skip
> -:code:`ZONE_MOVABLE` as a valid allocation target. This is because, as of
> -Linux v6.15, the page allocator does (approximately) the following: ::
> -
> - for (each zone in local_node):
> -
> - for (each node in fallback_order):
> -
> - attempt_allocation(gfp_flags);
> -
> -Because the local node does not have :code:`ZONE_MOVABLE`, the CXL node is
> -functionally unreachable for direct allocation. As a result, the only way
> -for CXL capacity to be used is via `demotion` in the reclaim path.
> -
> -This configuration also means that if the DRAM ndoe has :code:`ZONE_MOVABLE`
> -capacity - when that capacity is depleted, the page allocator will actually
> -prefer CXL :code:`ZONE_MOVABLE` pages over DRAM :code:`ZONE_NORMAL` pages.
> -
> -We may wish to invert this priority in future Linux versions.
> -
> -If `demotion` and `swap` are disabled, Linux will begin to cause OOM crashes
> -when the DRAM nodes are depleted. See the reclaim section for more details.
> -
> -
> CGroups and CPUSets
> ===================
> Finally, assuming CXL memory is reachable via the page allocation (i.e. onlined
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-11-03 23:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-03 14:32 [PATCH] Documentation/driver-api/cxl: remove page-allocator quirk section Gregory Price
2025-10-28 16:01 ` Jonathan Cameron
2025-11-03 23:36 ` Jonathan Corbet
2025-11-03 23:41 ` Dave Jiang
2025-11-03 23:41 ` Dave Jiang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox