lkml.org 
[lkml]   [2008]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Linux 2.6.24.4+mmap with overcommit >= 1
On Wed, Apr 30, 2008 at 11:24:53 +0100, Alan Cox wrote:
> On Wed, 30 Apr 2008 04:19:54 +0300
> Sami Farin <safari-kernel@safari.iki.fi> wrote:
>
> > I have arch x86_64, glibc-2.7.90-7 from Fedora.
> > When I have vm.overcommit_memory == 1 or 2,
> > mmap succeeds for really huge values.
> > These ranges succeed (approximate):
> > 8793870000000 - 17500387000000
> > 26390387000000 - 35180387000000
>
> Fun fun fun
>
> This should fix strict overcommit (== 2) I think

Thanks, one more reason to boot to 2.6.24.5...

This patch needed, too, I guess.

diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 3462bfd..a208a7b 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -132,7 +132,7 @@ static int meminfo_read_proc(char *page, char **start, off_t off,
#define K(x) ((x) << (PAGE_SHIFT - 10))
si_meminfo(&i);
si_swapinfo(&i);
- committed = atomic_read(&vm_committed_space);
+ committed = vm_atomic_read(&vm_committed_space);
allowed = ((totalram_pages - hugetlb_total_pages())
* sysctl_overcommit_ratio / 100) + total_swap_pages;


--
Do what you love because life is too short for anything else.



\
 
 \ /
  Last update: 2008-04-30 13:55    [W:0.045 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site