Re: [RFC PATCH] resource: Fix CXL node not populated issue
From: Bharata B Rao
Date: Wed Dec 11 2024 - 01:40:37 EST
On 11-Dec-24 10:14 AM, Dan Williams wrote:
I was able to reproduce a similar set of conditions with the cxl_test
environment:
f010000000-f04fffffff : Soft Reserved
f010000000-f04fffffff : CXL Window 0
f020000000-f03fffffff : region3
f020000000-f03fffffff : dax3.0
f020000000-f03fffffff : System RAM (kmem)
...but that did not result in the bug. So there are some other details
missing. Can you proceed with providing the dmesg from the good and the
bad cases?
gist.github.com is useful for this.
Sorry for the delay in providing the data. The system wasn't available
for a while. Now I have put the good(6.11.0-rc6) and bad(6.13.0-rc1)
dmesg and iomem logs at
https://gist.github.com/bharata/4a57db11e044fd1d313035f3dd5f763b
What I see is that in the bad case, we hit the below shown dev_dbg
message (not seen in the logs that are provided)
static int hmem_register_device(struct device *host, int target_nid,
const struct resource *res)
{
struct platform_device *pdev;
struct memregion_info info;
long id;
int rc;
if (IS_ENABLED(CONFIG_CXL_REGION) &&
region_intersects(res->start, resource_size(res),
IORESOURCE_MEM,
IORES_DESC_CXL) != REGION_DISJOINT) {
dev_dbg(host, "deferring range to CXL: %pr\n", res); <--
return 0;
}
With this, it appears that dev_dax_kmem_probe() won't happen for the CXL
range and hence CXL memory doesn't get detected.
Let us know if you need more debug data.
Regards,
Bharata.