Skip to contentSkip to conversation

max_mapped logic in shrink_cache()

DISCUSSION [email protected] 1 participant 1 message Dec 31, 2001

lore
Share & tools
lore
#0 lore raw

Hi,
we have in vmscan.c::shrink_cache() --
max_mapped = nr_pages << (9 - priority);

Here is the basic logic, in the time of high memory loads priority shall be less, consequently max_mapped shall be more.
Thus in case of high memory pressure, instead of decreasing max_mapped we are increasing it, thus invoking out_of_memory() when we could easily have called swap_out().

what is the logic of increasing max_mapped when priority is decreased..

-- Amol