From: Ira Weiny <ira.weiny@intel.com>
To: Gregory Price <gourry@gourry.net>, <linux-cxl@vger.kernel.org>,
<x86@kernel.org>, <linux-mm@kvack.org>,
<linux-acpi@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <dave.hansen@linux.intel.com>,
<luto@kernel.org>, <peterz@infradead.org>, <tglx@linutronix.de>,
<mingo@redhat.com>, <bp@alien8.de>, <hpa@zytor.com>,
<david@redhat.com>, <osalvador@suse.de>,
<gregkh@linuxfoundation.org>, <rafael@kernel.org>,
<akpm@linux-foundation.org>, <dan.j.williams@intel.com>,
<Jonathan.Cameron@huawei.com>, <alison.schofield@intel.com>,
<rrichter@amd.com>, <terry.bowman@amd.com>, <lenb@kernel.org>,
<dave.jiang@intel.com>, <ira.weiny@intel.com>
Subject: Re: [PATCH 0/3] memory,acpi: resize memory blocks based on CFMW alignment
Date: Tue, 8 Oct 2024 09:38:35 -0500 [thread overview]
Message-ID: <670543eae94d9_125a7294bd@iweiny-mobl.notmuch> (raw)
In-Reply-To: <20241008044355.4325-1-gourry@gourry.net>
Gregory Price wrote:
> When physical address capacity is not aligned to the size of a memory
> block managed size, the misaligned portion is not mapped - creating
> an effective loss of capacity.
>
> This appears to be a calculated decision based on the fact that most
> regions would generally be aligned, and the loss of capacity would be
> relatively limited. With CXL devices, this is no longer the case.
>
> CXL exposes its memory for management through the ACPI CEDT (CXL Early
> Detection Table) in a field called the CXL Fixed Memory Window. Per
> the CXL specification, this memory must be aligned to at least 256MB.
>
> On X86, memory block capacity increases based on the overall capacity
> of the machine - eventually reaching a maximum of 2GB per memory block.
> When a CFMW aligns on 256MB, this causes a loss of at least 2GB of
> capacity, and in some cases more.
>
> It is also possible for multiple CFMW to be exposed for a single device.
> This can happen if a reserved region intersects with the target memory
> location of the memory device. This happens on AMD x86 platforms.
I'm not clear why you mention reserved regions here. IIUC CFMW's can
overlap to describe different attributes which may be utilized based on
the devices which are mapped within them. For this reason, all CFMW's
must be scanned to find the lowest common denominator even if the HPA
range has already been evaluated.
Is that what you are trying to say?
>
> This patch set detects the alignments of all CFMW in the ACPI CEDT,
> and changes the memory block size downward to meet the largest common
> denomenator of the supported memory regions.
>
> To do this, we needed 3 changes:
> 1) extern memory block management functions for the acpi driver
> 2) modify x86 to update its cached block size value
> 3) add code in acpi/numa/srat.c to do the alignment check
>
> Presently this only affects x86, since this is the only architecture
> that implements set_memory_block_size_order.
>
> Presently this appears to only affect x86, and we only mitigated there
> since it is the only arch to implement set_memory_block_size_order.
NIT : duplicate statement
Ira
next prev parent reply other threads:[~2024-10-08 14:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 4:43 [PATCH 0/3] memory,acpi: resize memory blocks based on CFMW alignment Gregory Price
2024-10-08 4:43 ` [PATCH 1/3] memory: extern memory_block_size_bytes and set_memory_block_size_order Gregory Price
2024-10-08 14:03 ` David Hildenbrand
2024-10-08 14:51 ` Gregory Price
2024-10-08 15:02 ` David Hildenbrand
2024-10-08 15:21 ` Gregory Price
2024-10-08 19:04 ` Ira Weiny
2024-10-08 19:45 ` Gregory Price
2024-10-14 11:54 ` David Hildenbrand
2024-10-14 14:25 ` Gregory Price
2024-10-14 20:32 ` David Hildenbrand
2024-10-14 22:40 ` Gregory Price
2024-10-08 4:43 ` [PATCH 2/3] x86/mm: if memblock size is adjusted, update the cached value Gregory Price
2024-10-08 4:43 ` [PATCH 3/3] acpi,srat: reduce memory block size if CFMWS has a smaller alignment Gregory Price
2024-10-08 14:58 ` Ira Weiny
2024-10-08 15:17 ` Gregory Price
2024-10-08 16:46 ` Dan Williams
2024-10-14 11:50 ` David Hildenbrand
2024-10-08 19:02 ` Ira Weiny
2024-10-08 14:38 ` Ira Weiny [this message]
2024-10-08 14:49 ` [PATCH 0/3] memory,acpi: resize memory blocks based on CFMW alignment Gregory Price
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=670543eae94d9_125a7294bd@iweiny-mobl.notmuch \
--to=ira.weiny@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=alison.schofield@intel.com \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=david@redhat.com \
--cc=gourry@gourry.net \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=osalvador@suse.de \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rrichter@amd.com \
--cc=terry.bowman@amd.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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).