public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauricio Lin <mauriciolin@gmail.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: "Richard F. Rebel" <rrebel@whenu.com>,
	linux-kernel@vger.kernel.org,
	Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: Re: /proc/*/statm, exactly what does "shared" mean?
Date: Wed, 16 Feb 2005 06:41:32 -0400	[thread overview]
Message-ID: <3f250c710502160241222dce47@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0502121509170.19562@goblin.wat.veritas.com>

Hi all,

Sorry for responding this email so late. I was busy with my trip.

On Sat, 12 Feb 2005 15:42:15 +0000 (GMT), Hugh Dickins <hugh@veritas.com> wrote:
> On Sat, 12 Feb 2005, Richard F. Rebel wrote:
> >
> > That said, many mod_perl users are *VERY* interested in being able to
> > detect and observe how "shared" our forked children are.  Shared meaning
> > private pages shared with children (copy on write).  Is it even possible
> > to do this in 2.6 kernels?  If so, any pointers would be very helpful.
> 
> Not in any of the vanilla kernels.
> 
> Mauricio has a /proc/<pid>/smaps patch, in which he returns to looking
> at every pte slot of every vma of the process as /proc/<pid>/statm did
> in 2.4.  I suggest you ask him offline for his latest version (the last
> I saw did not include support for 2.6.11's pud level; 
I put the pud level on the last patch I sent to the linux-kernel list
as suggested by Marcelo Tosatti.

> and looped in an
> inefficient way, repeatedly locating, mapping and unmapping the page
> table for each pte slot - needs refactoring into pgd_range, pud_range,
> pmd_range, pte_range levels like 2.4's statm).
Well, for each vma it is checked how many pages are mapped to rss. So
I have to check per page if it is allocated in physical memory. I know
that this is a heavy function, but do you have any suggestion to
improve this?  What do you mean "needs refactoring into pgd_range,
pud_range, pmd_range, pte_range levels like 2.4's statm"? Could you
give more details, please?

BR,

Mauricio Lin.

  reply	other threads:[~2005-02-16 10:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 22:32 /proc/*/statm, exactly what does "shared" mean? Richard F. Rebel
2005-02-12 13:06 ` Hugh Dickins
2005-02-12 14:39   ` Richard F. Rebel
2005-02-12 15:42     ` Hugh Dickins
2005-02-16 10:41       ` Mauricio Lin [this message]
2005-02-16 12:00         ` Hugh Dickins
2005-02-16 15:02           ` Mauricio Lin
2005-02-16 15:17             ` Richard F. Rebel
2005-02-16 16:10               ` Hugh Dickins
2005-02-17 16:33                 ` Richard F. Rebel
2005-02-16 15:58             ` Hugh Dickins
2005-02-16 14:52     ` Benjamin LaHaise

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=3f250c710502160241222dce47@mail.gmail.com \
    --to=mauriciolin@gmail.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=rrebel@whenu.com \
    /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