lkml.org 
[lkml]   [2002]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Q: behaviour of mlockall(MCL_FUTURE) and VM_GROWSDOWN segments
On Sat, Jan 12, 2002 at 05:07:42PM +0100, Manfred Spraul wrote:
> Andi Kleen wrote:
> >
> > For the stack they can get minor faults anyways when they allocate new
> > stack space below ESP. There is no good way to fix that from the kernel; the
> > application has to preallocate its memory on stack. I think it's reasonable
> > if it does the same for holes on the stack.
> >
> Ok, everyone agrees that mlockall() should not grow VM_GROWSDOWN
> segments to their maximum size.

Ah, definitely. I must have misunderstood something in the discussion
sorry, I thought we were just discussiong the below issue, and I
completly missed the "maximum size" one.

All I was trying to find out here, was about the intermediate pages
between vm_start and vm_end of a VM_GROWSDOWN|VM_LOCKED vma, exactly
your example below.

> Should the page fault handler fill the hole created by
>
> void * grow_stack(void)
> {
> char data[100000];
> data[0] = '0';
> return data;
> }
>
> The principle of least surprise would mean filling holes, but OTHO sane
> apps would use memset(data,0,sizeof(data)).

yep.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.044 / U:2.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site