linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Cassell <mcassell411@gmail.com>
To: corbet@lwn.net, akpm@linux-foundation.org, vbendel@redhat.com,
	rppt@kernel.org
Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, mcassell411@gmail.com
Subject: [PATCH] Documentation/admin-guide/sysctl/vm.rst adding the importance of NUMA-node count to documentation
Date: Fri,  5 Apr 2024 16:49:20 +0000	[thread overview]
Message-ID: <20240405164920.2844-1-mcassell411@gmail.com> (raw)

If any bits are set in node_reclaim_mode (tunable via
/proc/sys/vm/zone_reclaim_mode) within get_pages_from_freelist(), then
page allocations start getting early access to reclaim via the
node_reclaim() code path when memory pressure increases. This behavior
provides the most optimization for multiple NUMA node machines. The above
is mentioned in:

Commit 9eeff2395e3cfd05c9b2e6 ("[PATCH] Zone reclaim: Reclaim logic")
states "Zone reclaim is of particular importance for NUMA machines. It
can be more beneficial to reclaim a page than taking the performance
penalties that come with allocating a page on a REMOTE zone."

While the pros/cons of staying on node versus allocating remotely are
mentioned in commit histories and mailing lists. It isn't specifically
mentioned in Documentation/ and isn't possible with a lone node. Imagine a
situation where CONFIG_NUMA=y (the default on most major distributions)
and only a single NUMA node exists. The latter is an oxymoron
(single-node == uniform memory access). Informing the user via vm.rst that
the most bang for their buck is when multiple nodes exist seems helpful.

Signed-off-by: Matthew Cassell <mcassell411@gmail.com>
---
 Documentation/admin-guide/sysctl/vm.rst | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst
index c59889de122b..10270548af2a 100644
--- a/Documentation/admin-guide/sysctl/vm.rst
+++ b/Documentation/admin-guide/sysctl/vm.rst
@@ -1031,7 +1031,8 @@ Consider enabling one or more zone_reclaim mode bits if it's known that the
 workload is partitioned such that each partition fits within a NUMA node
 and that accessing remote memory would cause a measurable performance
 reduction.  The page allocator will take additional actions before
-allocating off node pages.
+allocating off node pages. Keep in mind enabling bits in zone_reclaim_mode
+makes the most sense for topologies consisting of multiple NUMA nodes.
 
 Allowing zone reclaim to write out pages stops processes that are
 writing large amounts of data from dirtying pages on other nodes. Zone
-- 
2.34.1



             reply	other threads:[~2024-04-05 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 16:49 Matthew Cassell [this message]
2024-04-11  7:54 ` [PATCH] Documentation/admin-guide/sysctl/vm.rst adding the importance of NUMA-node count to documentation Vratislav Bendel
2024-04-12 20:48   ` Matthew Cassell
2024-04-27 14:05     ` Vratislav Bendel
2024-04-27 14:13     ` Vratislav Bendel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240405164920.2844-1-mcassell411@gmail.com \
    --to=mcassell411@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rppt@kernel.org \
    --cc=vbendel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).