From: Fan Ni <nifan.cxl@gmail.com>
To: "Fontenot, Nathan" <nafonten@amd.com>
Cc: David Hildenbrand <david@redhat.com>,
linux-cxl@vger.kernel.org, dan.j.williams@intel.com,
alison.schofield@intel.com, linux-mm@kvack.org,
gourry@gourry.net
Subject: Re: [PATCH v2 1/4] kernel/resource: Introduce managed SOFT RESERVED resources
Date: Tue, 21 Jan 2025 22:03:35 -0800 [thread overview]
Message-ID: <Z5CKN57paDmGJH9A@gpd> (raw)
In-Reply-To: <3c7c5b87-f241-482b-9b00-98e2e53d8e9c@amd.com>
On Tue, Jan 21, 2025 at 12:57:19PM -0600, Fontenot, Nathan wrote:
>
>
> On 1/21/2025 2:19 AM, David Hildenbrand wrote:
> > On 16.01.25 18:42, Nathan Fontenot wrote:
> >
> > Hi,
> >
> >> Introduce the ability to manage SOFT RESERVED kernel resources prior to
> >> these resources being placed in the iomem resource tree. This provides
> >> the ability for drivers to update SOFT RESERVED resources that intersect
> >> with their memory resources.
> >>
> >> During boot, any resources marked as IORES_DESC_SOFT_RESERVED are placed
> >> on the soft reserve resource tree. Once boot completes all resources
> >> are placed on the iomem resource tree. This behavior is gated by a new
> >> kernel option CONFIG_SOFT_RESERVED_MANAGED.
> >>
> >
> > I'm missing a bit of context here.
> >
> > Why can't we flag these regions in the existing iomem tree, where they can be fixed up (even after boot?)?
> >
> > Especially, what about deferred driver loading after boot? Why is that not a concern or why can we reliably handle everything "during boot" ?
>
> That's a good question and one I should have addressed.
>
> The goal is to prevent the dax driver from creating dax devices for soft reserve
> resources prior to the soft reserve resources being updated for any intersecting
> cxl regions.
Not an export. Can you explain a little more here?
What is the problem if we only flag the resources as "soft
reserved" in the iomem tree without creating a separate tree, and
process the "soft reserved" resources only when needed?
Fan
>
> During boot the dax hmem driver walks the iomem tree to save off a copy of all
> soft reserve resources. The dax driver then later walks this copy to create
> dax devices for the soft reserve regions. This occurs before the cxl drivers
> load, create cxl regions, and update any intersecting soft reserve resources.
>
> To prevent this the soft reserves are set aside on a separate list during boot
> so that they can be updated (if needed) and later added to the iomem resource tree.
> The dax driver is then notified of any soft reserves added to the iomem tree
> so that it may consume them.
>
> Hopefully that answers your question. I'll include this in the next version.
>
> -Nathan
>
> >
> >> As part of this update two new interfaces are added for management of
> >> the SOFT RESERVED resources. The release_srmem_region_adjustable()
> >> routine allows for removing pieces of SOFT RESERVED resources. The
> >> the merge_srmem_resources() allows drivers to merge any remaining SOFT
> >> RESERVED resources into the iomem resource tree once updatea are complete.
> >>
> >> Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com>
> >
>
next prev parent reply other threads:[~2025-01-22 6:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 17:42 [PATCH v2 0/4] Add managed SOFT RESERVE resource handling Nathan Fontenot
2025-01-16 17:42 ` [PATCH v2 1/4] kernel/resource: Introduce managed SOFT RESERVED resources Nathan Fontenot
2025-01-21 8:19 ` David Hildenbrand
2025-01-21 18:57 ` Fontenot, Nathan
2025-01-22 6:03 ` Fan Ni [this message]
2025-01-23 15:49 ` Fontenot, Nathan
2025-01-27 14:40 ` David Hildenbrand
2025-01-27 18:46 ` Fontenot, Nathan
2025-03-07 5:56 ` Zhijian Li (Fujitsu)
2025-03-07 16:47 ` Alison Schofield
2025-03-10 5:52 ` Li Zhijian
2025-03-07 23:05 ` Bowman, Terry
2025-03-10 6:00 ` Zhijian Li (Fujitsu)
2025-03-23 8:24 ` Zhijian Li (Fujitsu)
2025-03-23 8:33 ` Zhijian Li (Fujitsu)
2025-01-22 5:52 ` Fan Ni
2025-01-23 15:55 ` Fontenot, Nathan
2025-01-16 17:42 ` [PATCH v2 2/4] cxl: Update Soft Reserve resources upon region creation Nathan Fontenot
2025-01-16 17:42 ` [PATCH v2 3/4] dax: Update hmem resource/device registration Nathan Fontenot
2025-01-16 22:28 ` Ira Weiny
2025-01-21 18:49 ` Fontenot, Nathan
2025-01-21 23:14 ` Ira Weiny
2025-01-23 16:01 ` Fontenot, Nathan
2025-01-27 18:44 ` Fontenot, Nathan
2025-01-16 17:42 ` [PATCH v2 4/4] Add SOFT RESERVE resource notification chain Nathan Fontenot
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=Z5CKN57paDmGJH9A@gpd \
--to=nifan.cxl@gmail.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=gourry@gourry.net \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nafonten@amd.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