On Wed, Jun 28, 2000 at 07:56:01PM +0200, Andrea Arcangeli wrote:
>
> While you are oom, or while you're running mmap002, right? If so that's
> intentional and I'm very aware of the MAP_SHARED problem but what we did
> so far to fix that MAP_SHARED issue is band-aid (that could hurt the other
> cases that works right).
Right, and there is one trivially obvious bogosity in the VM which I
suspect is at the root of this particular behaviour.
try_to_free_pages() returns once it makes any progress. However,
"progress" does not mean freeing a page. Simply finding a page which
can be unmapped from a process's page tables is considered "progress".
Unmapping those pages doesn't actually free any memory; we still need
to (a) wait for any writeback IO to complete; and (b) reenter
shrink_mmap afterwards to remove the page from the page cache before
this "progress" results in genuine free pages.
So, shared mappings inevitably result in try_to_free_pages() returning
without freeing any physical memory. You can only do that so often
before processes start getting killed due to OOM.
--Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/