On Fri, Oct 18, 2019 at 2:40 PM Yang Shi <shy828301@xxxxxxxxx> wrote: > > On Fri, Oct 18, 2019 at 7:54 AM Dave Hansen <dave.hansen@xxxxxxxxx> wrote: > > > > On 10/18/19 12:44 AM, Michal Hocko wrote: > > > How does this compare to > > > http://lkml.kernel.org/r/1560468577-101178-1-git-send-email-yang.shi@xxxxxxxxxxxxxxxxx > > > > It's a _bit_ more tied to persistent memory and it appears a bit more > > tied to two tiers rather something arbitrarily deep. They're pretty > > similar conceptually although there are quite a few differences. > > My patches do assume two tiers for now but it is not hard to extend to > multiple tiers. Since it is a RFC so I didn't make it that > complicated. > > However, IMHO I really don't think supporting multiple tiers by making > the migration path configurable to admins or users is a good choice. It's an optional override not a user requirement. > Memory migration caused by compaction or reclaim (not via syscall) > should be transparent to the users, it is the kernel internal > activity. It shouldn't be exposed to the end users. > > I prefer firmware or OS build the migration path personally. The OS can't, it can only trust platform firmware to tell it the memory properties. The BIOS likely gets the tables right most of the time, and the OS can assume they are correct, but when things inevitably go wrong a user override is needed. That override is more usable as an explicit migration path rather than requiring users to manually craft and inject custom ACPI tables. I otherwise do not see the substance behind this objection to a migration path override.