From: Dan Williams <dan.j.williams@intel.com>
To: Shesha Bhushan Sreenivasamurthy <sheshas@marvell.com>,
"linux-cxl@vger.kernel.org" <linux-cxl@vger.kernel.org>
Subject: RE: DAX system-ram usage by the kernel
Date: Tue, 7 Feb 2023 10:23:54 -0800 [thread overview]
Message-ID: <63e2973a2af40_10757e29420@dwillia2-xfh.jf.intel.com.notmuch> (raw)
In-Reply-To: <DM6PR18MB2844FB8086757984EA312AE3AFD69@DM6PR18MB2844.namprd18.prod.outlook.com>
Shesha Bhushan Sreenivasamurthy wrote:
> Hello All,
> When a CXL memory is assigned as system-ram using daxctl after
> boot, can kernel allocate memory from this memory range which cannot
> be moved and prevent this device from being made offline ?
Yes. Even with ZONE_MOVABLE there is no 100% guarantee that Linux will
not pin pages in there that prevent removal. The command:
daxctl offline-memory $daxdev
...automates trying to offline all memblocks associate with $daxdev. If
that fails it means a page was busy in the kernel.
If a configuration needs hard guarantees then memory can not be onlined
at all and must be accessed via device-mappings. If the configuration
can tolerate "more often than not successful removal" then ZONE_MOVABLE
targets that. Note though that there is a ratio of ZONE_NORMAL needed to
support increasing ZONE_MOVABLE. See the "auto-movable" setting for
"online_policy" in Documentation/admin-guide/mm/memory-hotplug.rst for
more details.
prev parent reply other threads:[~2023-02-07 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 17:35 DAX system-ram usage by the kernel Shesha Bhushan Sreenivasamurthy
2023-02-02 17:56 ` Shesha Bhushan Sreenivasamurthy
2023-02-02 0:35 ` Gregory Price
2023-02-07 18:23 ` Dan Williams [this message]
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=63e2973a2af40_10757e29420@dwillia2-xfh.jf.intel.com.notmuch \
--to=dan.j.williams@intel.com \
--cc=linux-cxl@vger.kernel.org \
--cc=sheshas@marvell.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