Thanks for the clear introduction to the LRU implementation.
I'm not a kernel hacker, but still curious enough to look under the hood of my machine sometimes (especially in those moments when I'm convinced that a reasonable software cannot be so slow to complete the task in question...)
To look into memory management there is /proc/kpageflags, displayed in human readable format by the page-types tool (recently moved from Documentation/vm to tools in the kernel tree).
If I guess correctly the size of the active list can be shown using
"page-types -b active"
I further guess the size of the inactive list can be shown using
"page-types -b lru,~active,~unevictable"
(the article simplified from the fact that there are really 3 list nowadays, unevictable being the 3rd one. It's well described under Documentation/vm/unevictable-lru.txt)
However, when running these commands on 2 machines in this moment I get:
- active 168 MB, inactive 259 MB on a 512 MB system
- active 1366 MB, inactive 971 MB on a 4 GB system
So either my guesses about the options to use are incorrect or there is no such limitation as inactive > active.