All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@novell.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	William Lee Irwin III <wli@holomorphy.com>
Subject: Re: per-process shared information
Date: Fri, 15 Oct 2004 00:37:30 +0200	[thread overview]
Message-ID: <20041014223730.GI17849@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.44.0410142205450.2702-100000@localhost.localdomain>

On Thu, Oct 14, 2004 at 10:49:28PM +0100, Hugh Dickins wrote:
> Is "shared" generally expected to pair with rss?  Would it make

shared is expected to work like in linux 2.4 (and apparently solaris),
which means _physical_ pages mapped in more than one task.

> Sounds horrid to me!  I'm not inclined to volunteer for that: plus this

what's horrid? would you add a O(log(N)) slowdown in the fast paths to
provide the stat in O(1)? I much prefer an O(N) loop in the stats as far
as it catches signals and reschedules as soon as need_resched is set.

if you can suggest a not-horrid approach to avoid breaking binary
compatibility to 2.4 you're welcome ;)

> One, support anon_rss as a subset of rss, "shared" being (rss - anon_rss).
> Yes, that's a slight change in meaning of "shared" from in 2.4, but easy
> to support and I think very reasonable.  On the one hand, yes, of course

that's certainly much better than what we have right now, it's much
closer to the old semantics, but I'm not sure if it's enough to be
compliant with the other OS (including 2.4). I will ask. 

I also guess the app will stop breaking since rss - shared will not wrap
anymore.

> we know an anon page may actually be shared between several mms of the
> fork group, whereas it won't be counted in "shared" with this patch. But
> the old definition of "shared" was considerably more stupid, wasn't it?
> for example, a private page in pte and swap cache got counted as shared.

just checking mapcount > 1 would do it right in 2.6.

> Would this new meaning of "shared" suit your purposes well enough?

It'd be fine for me, but I'm no the one how's having troubles.

> shouldn't change that now, but add your statm_phys_shared; whatever,

the only reason to add statm_phys_shared was to keep ps xav fast, if you
don't slowdown pa xav you can add another field at the end of statm.

Ideally shared should have been set to 0 and it should have been moved
to statm_phys_shared. It's slow but not so horrid thanks to the mapcount
which makes it really strightforward (it's just a vma + pgtable walk,
the only tricky bit is the signal catch and need_resched).

  parent reply	other threads:[~2004-10-14 22:38 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-13 23:10 per-process shared information Andrea Arcangeli
2004-10-14 21:47 ` Marcelo Tosatti
2004-10-14 23:58   ` Andrea Arcangeli
2004-10-14 23:17     ` Marcelo Tosatti
2004-10-15 10:45     ` William Lee Irwin III
2004-10-14 21:49 ` Hugh Dickins
2004-10-14 22:11   ` William Lee Irwin III
2004-10-14 22:37   ` Andrea Arcangeli [this message]
2004-10-15 10:51     ` William Lee Irwin III
2004-10-15 11:56     ` Hugh Dickins
2004-10-15 13:19       ` Albert Cahalan
2004-10-15 14:28         ` William Lee Irwin III
2004-10-15 14:40           ` Albert Cahalan
2004-10-15 14:52             ` William Lee Irwin III
2004-10-15 17:02             ` Andrea Arcangeli
2004-10-15 16:20         ` Andrea Arcangeli
2004-10-15 16:31           ` Albert Cahalan
2004-10-15 17:10             ` William Lee Irwin III
2004-10-15 19:29               ` Albert Cahalan
2004-10-15 17:13             ` Andrea Arcangeli
2004-10-15 17:51               ` Albert Cahalan
2004-10-15 18:14                 ` Andrea Arcangeli
2004-10-15 18:30                   ` William Lee Irwin III
2004-10-15 18:40                     ` Andrea Arcangeli
2004-10-15 18:47                       ` William Lee Irwin III
2004-10-15 19:23                         ` Andrea Arcangeli
2004-10-15 20:41                           ` William Lee Irwin III
2004-10-15 20:52                             ` Andrea Arcangeli
2004-10-15 21:16                         ` William Lee Irwin III
2004-10-15 21:28                           ` Andrea Arcangeli
2004-10-15 21:40                             ` William Lee Irwin III
2004-10-15 22:04                               ` Hugh Dickins
2004-10-19 15:09           ` Bill Davidsen
2004-10-15 16:04       ` Andrea Arcangeli
2004-10-19 15:18         ` Bill Davidsen

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=20041014223730.GI17849@dualathlon.random \
    --to=andrea@novell.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.