Re: VM overhead

From: Ralf Baechle (ralf@conectiva.com.br)
Date: Fri May 19 2000 - 04:13:25 EST


On Thu, May 18, 2000 at 03:52:30PM +0200, Erik Corry wrote:

> > The pages you have not written to all point to the
> > zero-filled page. If you set up the mapping you'll
> > have 256k mappings to that one page :)
>
> Hmm. Quite misleading but at least internally consistent in some
> way. Normally I wouldn't expect the RSS to count a given physical
> page more than once.

That's the sematics of RSS. I guess it's that way because it's older
than shared pages in UNIX.

> > > Do I need more real RAM to fork if I have a large mmap like this?
> >
> > No. You will only need more RAM (or swap) if you
> > write to a lot of the pages, otherwise they'll
> > keep pointing (COW) to the zero-filled page.
>
> But I do need the 4k-page per 4Mbyte mapping to be duplicated, right?
> Or is that copy-on-write too?

No, the 4kb page is globally shared between all mappings in all processes.
It's a statically allocated page that is allocated on startup. On
certain MIPS CPUs we even allocated a set of 8 pages.

  Ralf

--
"Embrace, Enhance, Eliminate" - it worked for the pope, it'll work for Bill.

- 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/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:17 EST