[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250626200936.3974420-1-joshua.hahnjy@gmail.com>
Date: Thu, 26 Jun 2025 13:09:32 -0700
From: Joshua Hahn <joshua.hahnjy@...il.com>
To: Gregory Price <gourry@...rry.net>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alistair Popple <apopple@...dia.com>,
Byungchul Park <byungchul@...com>,
David Hildenbrand <david@...hat.com>,
Matthew Brost <matthew.brost@...el.com>,
Rakie Kim <rakie.kim@...com>,
Ying Huang <ying.huang@...ux.alibaba.com>,
Zi Yan <ziy@...dia.com>,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
kernel-team@...a.com
Subject: [PATCH 0/2] mm/mempolicy: Cleanup and optimization for weighted interleave
Two small patches for weighted interleave bulk allocaton.
The first patch simplifies the delta calculation needed for the allocations,
removing an if-else and performing unconditional additions instead.
The second patch makes a minor improvement to the weighted interleave bulk
allocation function by skipping a call to __alloc_pages_bulk.
Running a quick benchmark by compiling the kernel shows a small increase
in performance. These experiments were run on a machine with 2 nodes, each
with 125GB memory and 40 CPUs.
time numactl -w 0,1 make -j$(nproc)
+----------+---------+------------+---------+
| Time (s) | 6.16 | With patch | % Delta |
+----------+---------+------------+---------+
| Real | 88.374 | 88.3356 | -0.2019 |
| User | 3631.7 | 3636.263 | 0.0631 |
| Sys | 366.029 | 363.792 | -0.7534 |
+----------+---------+------------+---------+
Signed-off-by: Joshua Hahn <joshua.hahnjy@...il.com>
Joshua Hahn (2):
mm/mempolicy: Simplify weighted interleave bulk alloc calculations
mm/mempolicy: Skip extra call to __alloc_pages_bulk in weighted
interleave
mm/mempolicy.c | 52 ++++++++++++++++++++++++--------------------------
1 file changed, 25 insertions(+), 27 deletions(-)
base-commit: bf8761eda0930400291552bd314c9d59b720e899
--
2.47.1
Powered by blists - more mailing lists