On Mon, Feb 06, 2023 at 02:15:56PM -0800, Dan Williams wrote: > Gregory Price wrote: > > On Sun, Feb 05, 2023 at 05:04:05PM -0800, Dan Williams wrote: > [..] > > > > Stupid question: when defaulting to online, do these devices get placed > > into Zone Normal? Is there a way for us, at a minimum, to online this > > as Zone Moveable in an effort to assist the "hope the kernel has not > > pinned a page" problem (and to try to keep kernel resources out of this > > zone in general). > > > > If this is covered by a different patch or already set up this way, > > ignore me :] > > Have a look in Documentation/admin-guide/mm/memory-hotplug.rst, the > 'daxctl recconfigure-device' man page and the the policy options of how > hot-added memory is brought online. > > The routing can be anything from fully offline device-dax, to fully > online ZONE_NORMAL, or even a mix of device-dax subdivision, > ZONE_NORMAL, and ZONE_MOVABLE memblocks all within one CXL ram region. Hm. I'm just thinking, for early expander devices the assumption that the default behavior should be auto-online is good. Just kinda working through this in my head for multi-headed devices and early pools, and I suppose the kernel paremeter covers that. Most of those will be used in specialty, vertically integrated systems, so we're good to go. In the future when we get fully featured DCD's, I imagine we will have a memory region of size X, with N memory blocks, but only some of those blocks are online. I suppose it could also be done such that DCD capacity add events drive the creation of new blocks under the region, as opposed to having the region pre-create the blocks. Either way I think the kernel parameter probably covers this case as well, I'm just wondering if at some point the default will yet again wish to be false, but i think that's a "CXL has become so successful all memory is now CXL DCDs and computers look radically different" scenario. Anyway, this seems good. Reviewed-by: Gregory Price <gregory.price@xxxxxxxxxxxx>