From: Ravi Jonnalagadda <ravis.opensrc@micron.com>
To: <linux-mm@vger.kernel.org>, <linux-cxl@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-arch@vger.kernel.org>,
<linux-api@vger.kernel.org>, <luto@kernel.org>,
<tglx@linutronix.de>, <mingo@redhat.com>, <bp@alien8.de>,
<dietmar.eggemann@arm.com>, <vincent.guittot@linaro.org>,
<dave.hansen@linux.intel.com>, <hpa@zytor.com>, <arnd@arndb.de>,
<akpm@linux-foundation.org>, <x86@kernel.org>,
<aneesh.kumar@linux.ibm.com>, <gregory.price@memverge.com>,
<ying.huang@intel.com>, <jgroves@micron.com>,
<ravis.opensrc@micron.com>, <sthanneeru@micron.com>,
<emirakhur@micron.com>, <vtanna@micron.com>
Subject: [RFC PATCH 0/2] mm: mempolicy: Multi-tier interleaving
Date: Wed, 27 Sep 2023 15:20:00 +0530 [thread overview]
Message-ID: <20230927095002.10245-1-ravis.opensrc@micron.com> (raw)
From: Ravi Shankar <ravis.opensrc@micron.com>
Hello,
The current interleave policy operates by interleaving page requests
among nodes defined in the memory policy. To accommodate the
introduction of memory tiers for various memory types (e.g., DDR, CXL,
HBM, PMEM, etc.), a mechanism is needed for interleaving page requests
across these memory types or tiers.
This can be achieved by implementing an interleaving method that
considers the tier weights.
The tier weight will determine the proportion of nodes to select from
those specified in the memory policy.
A tier weight can be assigned to each memory type within the system.
Hasan Al Maruf had put forth a proposal for interleaving between two
tiers, namely the top tier and the low tier. However, this patch was
not adopted due to constraints on the number of available tiers.
https://lore.kernel.org/linux-mm/YqD0%2FtzFwXvJ1gK6@cmpxchg.org/T/
New proposed changes:
1. Introducea sysfs entry to allow setting the interleave weight for each
memory tier.
2. Each tier with a default weight of 1, indicating a standard 1:1
proportion.
3. Distribute the weight of that tier in a uniform manner across all nodes.
4. Modifications to the existing interleaving algorithm to support the
implementation of multi-tier interleaving based on tier-weights.
This is inline with Huang, Ying's presentation in lpc22, 16th slide in
https://lpc.events/event/16/contributions/1209/attachments/1042/1995/\
Live%20In%20a%20World%20With%20Multiple%20Memory%20Types.pdf
Observed a significant increase (165%) in bandwidth utilization
with the newly proposed multi-tier interleaving compared to the
traditional 1:1 interleaving approach between DDR and CXL tier nodes,
where 85% of the bandwidth is allocated to DDR tier and 15% to CXL
tier with MLC -w2 option.
Usage Example:
1. Set weights for DDR (tier4) and CXL(teir22) tiers.
echo 85 > /sys/devices/virtual/memory_tiering/memory_tier4/interleave_weight
echo 15 > /sys/devices/virtual/memory_tiering/memory_tier22/interleave_weight
2. Interleave between DRR(tier4, node-0) and CXL (tier22, node-1) using numactl
numactl -i0,1 mlc --loaded_latency W2
Srinivasulu Thanneeru (2):
memory tier: Introduce sysfs for tier interleave weights.
mm: mempolicy: Interleave policy for tiered memory nodes
include/linux/memory-tiers.h | 27 ++++++++-
include/linux/sched.h | 2 +
mm/memory-tiers.c | 67 +++++++++++++++-------
mm/mempolicy.c | 107 +++++++++++++++++++++++++++++++++--
4 files changed, 174 insertions(+), 29 deletions(-)
--
2.39.3
next reply other threads:[~2023-09-27 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 9:50 Ravi Jonnalagadda [this message]
2023-09-27 9:50 ` [PATCH 1/2] memory tier: Introduce sysfs for tier interleave weights Ravi Jonnalagadda
2023-10-02 10:26 ` Jonathan Cameron
2023-09-27 9:50 ` [PATCH 2/2] mm: mempolicy: Interleave policy for tiered memory nodes Ravi Jonnalagadda
2023-09-28 6:56 ` Huang, Ying
2023-09-28 18:25 ` Gregory Price
2023-10-02 10:48 ` Jonathan Cameron
2023-10-20 17:05 ` kernel test robot
2023-09-28 6:14 ` [RFC PATCH 0/2] mm: mempolicy: Multi-tier interleaving Huang, Ying
2023-10-03 5:07 ` [EXT] " Srinivasulu Thanneeru
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=20230927095002.10245-1-ravis.opensrc@micron.com \
--to=ravis.opensrc@micron.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=emirakhur@micron.com \
--cc=gregory.price@memverge.com \
--cc=hpa@zytor.com \
--cc=jgroves@micron.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=sthanneeru@micron.com \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=vtanna@micron.com \
--cc=x86@kernel.org \
--cc=ying.huang@intel.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