linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: paul.szabo@sydney.edu.au, 695182@bugs.debian.org
Cc: dave@linux.vnet.ibm.com, pavel@ucw.cz,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: Bug#695182: [RFC] Reproducible OOM with just a few sleeps
Date: Thu, 31 Jan 2013 05:15:34 +0000	[thread overview]
Message-ID: <1359609334.31386.40.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <201301301940.r0UJeEKa016044@como.maths.usyd.edu.au>

[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]

On Thu, 2013-01-31 at 06:40 +1100, paul.szabo@sydney.edu.au wrote:
> Dear Pavel and Dave,
> 
> > The assertion was that 4GB with no PAE passed a forkbomb test (ooming)
> > while 4GB of RAM with PAE hung, thus _PAE_ is broken.
> 
> Yes, PAE is broken. Still, maybe the above needs slight correction:
> non-PAE HIGHMEM4G passed the "sleep test": no OOM, nothing unexpected;
> whereas PAE OOMed then hung (tested with various RAM from 3GB to 64GB).
> 
> The feeling I get is that amd64 is proposed as a drop-in replacement for
> PAE, that support and development of PAE is gone, that PAE is dead.

PAE was a stop-gap that kept x86-32 alive on servers until x86-64 came
along (though it was supposed to be ia64...).  That's why I was
surprised you were still trying to run a 32-bit kernel.

The fundamental problem with Linux on 32-bit systems for the past ~10
years has been that RAM sizes approached and exceeded the 32-bit virtual
address space and the kernel can't keep it all mapped.

Whenever a task makes a system call the kernel will continue to use the
same virtual memory mappings to access that task's memory, as well as
its own memory.  Which means both of those have to fit within the
virtual address space.  (The alternative of using separate address
spaces is pretty bad for performance - see OS X as an example.  And it
only helps you as far as 4GB RAM.)

The usual split on 32-bit machines is 3GB virtual address space for each
task and 1GB for the kernel.  Part of that 1GB is reserved for memory-
mapped I/O and temporary mappings, and the rest is mapped to the
beginning of RAM (lowmem).  All the remainder of RAM is highmem,
available for allocation by tasks but not for the kernel's private data
(in general).

Switching to PAE does not change the amount of lowmem, but it does make
hardware page table entries (which of course live in lowmem) twice as
big.  This increases the pressure on lowmem a little, which probably
explains the negative result of your 'sleep test'.  However if you then
try to take full advantage of the 64GB range of PAE, as you saw earlier,
the shortage of lowmem relative to highmem becomes completely untenable.

Ben.

-- 
Ben Hutchings
If more than one person is responsible for a bug, no one is at fault.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2013-01-31  5:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-12  3:31 paul.szabo
2013-01-14 15:00 ` Dave Hansen
2013-01-14 20:36   ` paul.szabo
2013-01-15  0:34     ` Bug#695182: " Ben Hutchings
2013-01-15  0:56     ` Dave Hansen
2013-01-15  2:16       ` paul.szabo
2013-01-30 12:51       ` Pavel Machek
2013-01-30 15:32         ` Dave Hansen
2013-01-30 19:40           ` paul.szabo
2013-01-31  5:15             ` Ben Hutchings [this message]
2013-01-31  9:07               ` Bug#695182: " paul.szabo
2013-01-31 13:38                 ` Ben Hutchings
2013-01-31 23:06                   ` paul.szabo
2013-02-01  1:07                     ` Ben Hutchings
2013-02-01  2:12                       ` paul.szabo
2013-02-01  2:57                         ` Ben Hutchings
2013-02-01  3:13                           ` paul.szabo
2013-02-01  4:38                             ` Phil Turmel
2013-02-01 10:20                               ` Pavel Machek
2013-02-01 10:25                                 ` PAE problems was " Pavel Machek
2013-02-01 16:57                                   ` H. Peter Anvin
2013-02-01 17:45                                     ` Ben Hutchings
2013-02-07  0:28                                   ` Dave Hansen
2013-02-10 19:09                                     ` Pavel Machek
2013-02-17  9:10   ` Simon Jeons
2013-02-24 22:10     ` paul.szabo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359609334.31386.40.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=695182@bugs.debian.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=paul.szabo@sydney.edu.au \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox