[lkml]   [2000]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Avoiding OOM on overcommit...?
On Fri, 24 Mar 2000, Alexander Viro wrote:
>On Fri, 24 Mar 2000, David Whysong wrote:
>> On Fri, 24 Mar 2000, Alexander Viro wrote:
>> >RTFComments. Sharing of text pages is unrelated to overcommit.
>> But demand loading certainly is related to overcommit, unless the kernel
>> was careful to count how many pages it hasn't loaded yet?
>There are _text_ pages. As in "ones that can be thrown away at any
>moment". Check what part of the binaries is mapped with write allowed.
>That's where demand loading may have something with overcommit.

And there are also data pages. From 1.0, fs/exec.c:

error = do_mmap(file, N_TXTADDR(ex) + ex.a_text, ex.a_data,

do_mmap is also called for text, read-only.

The comments say:

* Demand-loading implemented 01.12.91 - no need to read anything but
* the header into memory. The inode of the executable is put into
* "current->executable", and page faults do the actual loading. Clean.

and later

* Demand loading changed July 1993 by Eric Youngdale. Use mmap instead,
* current->executable is only used by the procfs.

Looks to me like data was demand loaded in early kernels... and we're
completely ignoring stack growth, of course.


David Whysong
Astrophysics graduate student University of California, Santa Barbara
My public PGP keys are on my web page -
DSS PGP Key 0x903F5BD6 : FE78 91FE 4508 106F 7C88 1706 B792 6995 903F 5BD6
D-H PGP key 0x5DAB0F91 : BC33 0F36 FCCD E72C 441F 663A 72ED 7FB7 5DAB 0F91

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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