Linus Torvalds writes: (Summary) But if it's some kind of "try and
try again" pattern, the second time you try and there are people
waiting for the page, the page count (not the map count) would be
elevanted.
elevanted.
So it's possible that depending on exactly what the deeper problem is, the "this page is very busy, don't migrate" case might be discoverable, and the page count might be part of it. However, after PeterZ made that comment that page migration should have that should_numa_migrate_memory() filter, I am looking at that mpol_misplaced() code.
mpol_misplaced() code.
And honestly, that MPOL_PREFERRED / MPOL_F_LOCAL case really looks like complete garbage to me.
like complete garbage to me.
It looks like garbage exactly because it says "always migrate to the current node", but that's crazy - if it's a group of threads all running together on the same VM, that obviously will just bounce the page around for absolute zero good ewason.
page around for absolute zero good ewason.
The *other* memory
elevanted.
So it's possible that depending on exactly what the deeper problem is, the "this page is very busy, don't migrate" case might be discoverable, and the page count might be part of it. However, after PeterZ made that comment that page migration should have that should_numa_migrate_memory() filter, I am looking at that mpol_misplaced() code.
mpol_misplaced() code.
And honestly, that MPOL_PREFERRED / MPOL_F_LOCAL case really looks like complete garbage to me.
like complete garbage to me.
It looks like garbage exactly because it says "always migrate to the current node", but that's crazy - if it's a group of threads all running together on the same VM, that obviously will just bounce the page around for absolute zero good ewason.
page around for absolute zero good ewason.
The *other* memory