Why cannot we simply demote in the proximity order? Why do you makeWhy cannot we start simple and build from there? In other words I do notIn this patchset N_CPU_MEM is used to tell us what nodes are cpuless nodes.
think we really need anything like N_CPU_MEM at all.
They would be the preferred demotion target. Of course, we could rely on
firmware to just demote to the next best node, but it may be a "preferred"
node, if so I don't see too much benefit achieved by demotion. Am I missing
anything?
cpuless nodes so special? If other close nodes are vacant then just use
them.
We could. But, this raises another question, would we prefer to just demote to the next fallback node (just try once), if it is contended, then just swap (i.e. DRAM0 -> PMEM0 -> Swap); or would we prefer to try all the nodes in the fallback order to find the first less contended one (i.e. DRAM0 -> PMEM0 -> DRAM1 -> PMEM1 -> Swap)?
|------|ÂÂÂÂ |------| |------|ÂÂÂÂÂÂÂ |------|
|PMEM0|---|DRAM0| --- CPU0 --- CPU1 --- |DRAM1| --- |PMEM1|
|------|ÂÂÂÂ |------| |------|ÂÂÂÂÂÂ |------|
The first one sounds simpler, and the current implementation does so and this needs find out the closest PMEM node by recognizing cpuless node.
If we prefer go with the second option, it is definitely unnecessary to specialize any node.