On Fri 09-08-19 07:57:44, Yang Shi wrote:
When doing partial unmap to THP, the pages in the affected range wouldIs this a fallout of the recent deferred freeing work?
be considered to be reclaimable when memory pressure comes in. And,
such pages would be put on deferred split queue and get minus from the
memory statistics (i.e. /proc/meminfo).
For example, when doing THP split test, /proc/meminfo would show:
Before put on lazy free list:
MemTotal: 45288336 kB
MemFree: 43281376 kB
MemAvailable: 43254048 kB
...
Active(anon): 1096296 kB
Inactive(anon): 8372 kB
...
AnonPages: 1096264 kB
...
AnonHugePages: 1056768 kB
After put on lazy free list:
MemTotal: 45288336 kB
MemFree: 43282612 kB
MemAvailable: 43255284 kB
...
Active(anon): 1094228 kB
Inactive(anon): 8372 kB
...
AnonPages: 49668 kB
...
AnonHugePages: 10240 kB
The THPs confusingly look disappeared although they are still on LRU if
you are not familair the tricks done by kernel.
Accounted the lazy free pages to NR_LAZYFREE, and show them in meminfoThe name is really confusing because I have thought of MADV_FREE immediately.
and other places. With the change the /proc/meminfo would look like:
Before put on lazy free list:
+LazyFreePages: Cleanly freeable pages under memory pressure (i.e. deferredWhat does that mean actually? I have hard time imagine what cleanly
+ split THP).
freeable pages mean.