lkml.org 
[lkml]   [2002]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Arch option to touch newly allocated pages
Date
From
> Does address space accounting enforce tmpfs limits (and other limits, like
> RSS, when it happens)? Or is it enforcing a global limit?

It ensures that the total number of anonymous and/or tmpfs (eg anon shared)
pages that are mappable will fit in swap (or in mode 2 swap + 0.5*ram). You
never get a SIGBUS. Writes to tmpfs for new blocks will fail if that would
place the system in a potential overcommit situation.

> > Nothing of the sort. Sitting in a gnome desktop I'm showing a 41200Kb
> > worst case swap requirement, but it appears under half of that is
> > used.
>
> This I don't get. I'm assuming that the vast majority of the time when a
> set of pages is returned by __alloc_pages, they all are going to be written
> pretty soon. This being the case, how can it possibly affect anything to
> touch them at the end of __alloc_pages?

It isnt the alloc pages that is the problem.

You mmap - no pages are allocated. You use them , pages get allocated. If
you look at the actual maps you'll find a lot of people allocate an area
of address space but don't use it all. Without the address overcommit
management nothing guarantees that when you touch those pages you won't
fault. Furthermore unless you are very careful you may fault again on
the stack push for the SIGBUS and if that faults - SIGKILL->OOM time


Alan
-
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:24    [W:0.109 / U:1.260 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site