9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Ronald G Minnich <rminnich@lanl.gov>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] [Fwd: [olpc-software] Multi-protection VMAs and memory usage]
Date: Fri, 12 May 2006 09:46:00 -0600	[thread overview]
Message-ID: <4464ADB8.9080901@lanl.gov> (raw)

Just got this from the OLPC list. Another reason to love shared 
libaries. Are things getting kludgy here or what ...


=====
LWN lwn.net had an article this week discussing a patch that can
result is some nice memory savings for 'multi-protection VMAs'

Here is a link the relevant kernel mailing list thread

http://thread.gmane.org/gmane.linux.kernel/402675

and here is an excerpt from the lwn article,

"Ordinary Linux users could also benefit from this patch, however.
Ulrich Drepper explained how the C library uses VMAs currently; it
turns out that linking to a single shared library can create up to
five separate VMAs. An application which brings in a large number of
libraries - as many desktop applications do - can end up creating
hundreds of VMAs for shared library mappings. That leads to many VMAs
being created on the system; just how many can be seen by looking at
the vm_area_struct line in /proc/slabinfo. Your editor's system
currently has over 13,000 VMAs active, using about 2.5MB of memory.

Of the five VMAs potentially created by glibc for each shared library
mapping, four are mappings into the same file with different
permissions. The ability to have multiple permissions settings within
a single VMA has the potential to collapse those four VMAs into one,
leaving a single file mapping and an anonymous memory segment for each
library. The result would be significantly reduced memory usage and
faster kernel performance. Those benefits are likely to motivate the
inclusion of this patch, sooner or later. "



             reply	other threads:[~2006-05-12 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-12 15:46 Ronald G Minnich [this message]
2006-05-12 15:58 ` [9fans] [Fwd: [olpc-software] Multi-protection VMAs and memory quanstro
2006-05-16 10:47   ` Paweł Lasek
2006-05-16 16:59     ` LiteStar numnums
2006-05-12 16:23 ` [9fans] [Fwd: [olpc-software] Multi-protection VMAs and memory usage] David Leimbach

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=4464ADB8.9080901@lanl.gov \
    --to=rminnich@lanl.gov \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).