lkml.org 
[lkml]   [2008]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: __vm_enough_memory(), OVERCOMMIT_NEVER, current->mm, kernel thread
> In your first option, write() to the exported tmpfs will produce the
> warning on nfs server even if much memory is left. I don't think it is a

No - the shmem routine would use vm_enough_memory_fs which wouldn't care
if current->mm is NULL, but the others would check.

> good idea.
> I'd suggest to make __vm_enough_memory() would skip the 3% adjustment
> only.
>
> --- /src/linux-2.6/linux-2.6.27/mm/mmap.c 2008-10-10 07:13:53.000000000 +0900
> +++ /tmp/mmap.c 2008-10-22 08:07:09.000000000 +0900
> @@ -173,9 +173,10 @@
> allowed -= allowed / 32;
> allowed += total_swap_pages;
>
> - /* Don't let a single process grow too big:
> + /* Don't let a single user process grow too big:
> leave 3% of the size of this process for other processes */
> - allowed -= mm->total_vm / 32;
> + if (mm)
> + allowed -= mm->total_vm / 32;

Doing this means we lose the ability to trap incorrect calls to
vm_enough_memory.

Alan


\
 
 \ /
  Last update: 2008-10-22 10:31    [W:0.157 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site