Unevictable: 4 kB
The Unevictable LRU infrastructure addresses the following classes of unevictable pages: + page owned by ram disks or ramfs + page mapped into SHM_LOCKed shared memory regions + page mapped into VM_LOCKED [mlock()ed] vmas
Least Recently Used (LRU): discards the least recently used items first. This algorithm requires keeping track of what was used when, which is expensive if one wants to make sure the algorithm always discards the least recently used item. General implementations of this technique require to keep "age bits" for cache-lines and track the "Least Recently Used" cache-line based on age-bits. In such implementation, every time a cache-line is used, the age of all other cache-lines changes. LRU is actually a family of caching algorithms with members including: 2Q by Theodore Johnson and Dennis Shasha and LRU/K by Pat O'Neil, Betty O'Neil and Gerhard Weikum.
Hugetlb pages are also unevictable. Hugepages are already implemented in a way that these pages don't reside on the LRU and hence are not iterated over during the vmscan. So there is no need to move around these pages across different LRU's. We just account these pages as unevictable for correct statistics.
The Unevictable LRU adds an additional LRU list to track unevictable pages and to hide these pages from vmscan. This mechanism is based on a patch by Larry Woodman of Red Hat to address several scalability problems with page reclaim in Linux. The problems have been observed at customer sites on large memory x86_64 systems. For example, a non-numal x86_64 platform with 128GB of main memory will have over 32 million 4k pages in a single zone. When a large fraction of these pages are not evictable for any reason [see below], vmscan will spend a lot of time scanning the LRU lists looking for the small fraction of pages that are evictable. This can result in a situation where all cpus are spending 100% of their time in vmscan for hours or days on end, with the system completely unresponsive.