Re: [RFC PATCH] resource: Fix CXL node not populated issue

From: Dan Williams
Date: Tue Dec 10 2024 - 23:44:52 EST


Raghavendra K T wrote:
>
>
> On 12/6/2024 1:20 PM, Dan Williams wrote:
> > Raghavendra K T wrote:
> >>
> [...]
> >> B. /proc/iomem
> >>
> >> $ vimdiff success fail
> >>
> >> 4050000000-604fffffff : Soft Reserved
> >> | 164 4050000000-604fffffff : Soft Reserved
> >> 165 4050000000-604fffffff : CXL Window 0
> >> | 165 4050000000-604fffffff : CXL Window 0
> >> 166 4080000000-5fffffffff : dax1.0
> >> |
> >> ------------------------------------------------------------------------
> >> 167 4080000000-5fffffffff : System RAM (kmem)
> >> |
> >> --------------------------------------------------------------------
> >
> > My eyes only know how to read unified diff (diff -u) format. Is this
> > saying that in the failure case the System RAM range for dax1.0 is
> > missing?
>
>
> Sorry for that formatting. I realized later.
> Yes. dax1.0 missing in the failure case.
>
> Looks like problem is that,
>
> 4050000000-604fffffff : Soft Reserved
> 4050000000-604fffffff : CXL Window 0
> 4080000000-5fffffffff : dax1.0
> 4080000000-5fffffffff : System RAM (kmem)
>
> this use case where,
>
> |A<------------->D| CXL window
> |..|B<-->C|.......| kmem
>
> B->C range that falls within A->D as in above somehow
> not covered after the patch.

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.