public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bill Davidsen <davidsen@tmr.com>
To: linux-kernel@vger.kernel.org
Subject: Re: per-process shared information
Date: Tue, 19 Oct 2004 11:18:39 -0400	[thread overview]
Message-ID: <cl3al8$poi$1@gatekeeper.tmr.com> (raw)
In-Reply-To: <20041015160424.GA17849@dualathlon.random>

Andrea Arcangeli wrote:
> On Fri, Oct 15, 2004 at 12:56:22PM +0100, Hugh Dickins wrote:
> 
>>Well, it didn't quite mean that in 2.4: since any pagecache (including
>>swapcache) page mapped into a single task would have page_count 2 and
>>so be counted as shared.
> 
> 
> Well, doing page_mapcount + !PageAnon should do the trick. My point is
> that the confusion of an anon page going in swapcache (the one you
> mentioned) is easily fixable.
> 
> 
>>I think 2.4 was already trying to come up with a plausible simulacrum
>>of numbers that made sense to gather in 2.2, but the numbers had lost
>>their point, and it only had page_count to play with.  Or maybe 2.2
>>was already trying to make up numbers to fit with 2.0...
> 
> 
> ;)
> 
> 
>>[..] and I don't want to
>>give the cpu unnecessary work, [..]
> 
> 
> this doesn't make much sense to me, then you should as well forbid
> the user to run main () { for(;;) }.
> 
> Of course doing a sort of for(;;) in each pid of ps xav is overkill, but
> on demand easily killable and reschedule friendly would be no different
> than allowing an user to execute main () { for(;;) }. All you can do is
> to renice it or use CKRM to lower its cpu availability from the
> scheduler, or kill -9.
> 
> 
>>remove even the vma walk; but I accept you're being careful to propose
>>that we keep the overhead out of existing /proc/pid uses - right if
>>we have to go that way, but I just prefer to avoid the work myself.
> 
> 
> correct. I'd also prefer to avoid this work myself.
> 
> 
>>I hope that's what my patch would be sufficient to achieve.
> 
> 
> I hope too.
> 
> 
>>It would be unfair to say 2.4's numbers were actually a bug, but
>>certainly peculiar: I'm about as interested in exactly reproducing
>>their oddities as in building a replica of some antique furniture.
> 
> 
> sure the swapcache bit would need fixing ;)
> 
> 
>>Oh, if that's all we need, I can do a simpler patch ;)
> 
> 
> yep ;) though such simpler patch would return no-sensical results, it
> would provide no-information at all in some case.
> 
> 
>>Interesting idea, and now (well, 2.6.9-mm heading to 2.6.10) we have
>>atomic_inc_return and atomic_dec_return supported on all architectures,
>>it should be possible to adjust an mm->shared_rss each time mapcount
>>goes up from 1 or down to 1, as well as adjusting nr_mapped count
>>as we do when it goes up from 0 or down to 0.
> 
> 
> I believe your approach will work fine, and it's much closer to the 2.4
> physical-driven semantics. It looks like "shared" really means
> not-anonymous memory, but accounted on a physical basis.
> 
> However I wouldn't mind if you want to add a new field and to provide
> both the "virtual" shared like 2.6 right now, along the "physical"
> shared miming the semantics of 2.4 (they could be both in statm since
> they're O(1) to collect).

If it's cheap I'd like to see that. I don't know until I see the numbers 
if it will be useful information for system tuning, but many servers 
(web, news, mail) offer fork vs. thread operation and sometimes 
non-intuitive performance results, so I'd like to have more data.

-- 
    -bill davidsen (davidsen@tmr.com)
"The secret to procrastination is to put things off until the
  last possible moment - but no longer"  -me

      reply	other threads:[~2004-10-19 15:16 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
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 [this message]

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='cl3al8$poi$1@gatekeeper.tmr.com' \
    --to=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    /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