On Wed, Apr 05, 2023 at 11:01:21AM +0900, Kyungsan Kim wrote: > >1. Should we have the page allocator return pages from CXL or should > > CXL memory be allocated another way? > I think yes. Using CXL DRAM as System RAM interface would be the primary use case in real-world application in regards to compatibility. > So, on the System RAM interface, we think it should be managed by Linux MM subsystem. (Node - Zonelist - buddy page allocator) I don't think this is the right approach. > >2. Should there be a way for userspace to indicate that it prefers CXL > > memory when it calls mmap(), or should it always be at the discretion > > of the kernel? > I think yes. Both implcit and explict ways are meaningful for users on a different purpose. > The dynamic performance variation of CXL DRAM is likely bigger than other memory types due to the topology expansion and link negotiation. > I think it strengthens the needs. I also disagree with your answer here. > >3. Do we continue with the current ZONE_DEVICE model, or do we come up > > with something new? > In fact, ZONE_DEVICE was the our first candidate for CXL DRAM. > But because ZONE_DEVICE is not managed by buddy, we thought it does not fit to provide System RAM interface. But what you're proposing (separate GFP_EXMEM, ZONE_EXMEM, etc) doesn't let the buddy allocator satisfy GFP_KERNEL allocations from CXL. So what's the point?