[lkml]   [2011]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/1] mmap: Don't count shmem pages as free in __vm_enough_memory
If I understand the logic correctly, even systems with swap set to
OVERCOMMIT_GUESS are equally affected,
what we are trying to do here is count the amount of immediately available
"potentially" available space both in memory and in swap. shmem is not
available, but it is not potentially available either, even if we swap it
out, it will
just be relocated from memory into swap, total amount of immediate and
available memory is not going to be affected, so we shouldn't count it as
in the first place.


On 7/3/11 5:43 PM, "Minchan Kim" <> wrote:

>On Mon, Jul 4, 2011 at 4:39 AM, Dmitry Fink <> wrote:
>> shmem pages can't be reclaimed and if they are swapped out
>> that doesn't affect the overall available memory in the system,
>> so don't count them along with the rest of the file backed pages.
>> Signed-off-by: Dmitry Fink <>
>Reviewed-by: Minchan Kim <>
>I am not sure the description is good. :(
>But I think this patch is reasonable.
>In swapless system,guessing overcommit can have a problem.
>And in current implementation of OVERCOMMIT_GUESS, we consider anon
>pages as empty space of swap so shmem pages should be accounted by
>Kind regards,
>Minchan Kim

 \ /
  Last update: 2011-07-04 05:23    [W:0.062 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site