vmscan.c: shrink_cache() doubt
In shrink_cache(), we have
if (!page->buffers && (page_count(page) != 1 || !page->mapping))
goto page_mapped;
.
.
.
page_mapped:
if (--max_mapped >=0)
continue;Assume page->buffers == NULL and page->count == 1, then why jump to page_mapped if page->mapping == NULL ??
-- Amol
Quoted 12 lines · [email protected] wrote:
In
shrink_cache(), we haveif (!page->buffers && (page_count(page) != 1 || !page->mapping)) goto page_mapped; . . . page_mapped: if (--max_mapped >=0) continue;
Quoted 3 lines
Assume
page->buffers== NULL andpage->count== 1, then why jump topage_mappedifpage->mapping== NULL ??
These are anonymous pages - memory returned by malloc() rather than by mmap().
Replace max_mapped with max_unfreeable and replace page_mapped with page_unfreeable and it may make some sense.
-