linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Badari Pulavarty <pbadari@us.ibm.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
	linux-mm <linux-mm@kvack.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Better pagecache statistics ?
Date: Thu, 01 Dec 2005 08:23:48 -0800	[thread overview]
Message-ID: <1133454228.21429.11.camel@localhost.localdomain> (raw)
In-Reply-To: <1133453411.2853.67.camel@laptopd505.fenrus.org>

On Thu, 2005-12-01 at 17:10 +0100, Arjan van de Ven wrote:
> > Out of "Cached" value - to get details like
> > 
> > 	<mmap> - xxx KB
> > 	<shared mem> - xxx KB
> > 	<text, data, bss, malloc, heap, stacks> - xxx KB
> > 	<filecache pages total> -- xxx KB
> > 		(filename1 or <dev>, <ino>) -- #of pages
> > 		(filename2 or <dev>, <ino>) -- #of pages
> > 		
> > This would be really powerful on understanding system better.
> 
> to some extend it might be useful.
> I have a few concerns though
> 1) If we make these stats into an ABI then it becomes harder to change
> the architecture of the VM radically since such concepts may not even
> exist in the new architecture. As long as this is some sort of advisory,
> humans-only file I think this isn't too much of a big deal though.

ABI or API ? yuck. I am thinking more like a /proc/cachedetail like
thing (mostly for debug).

> 
> 2) not all the concepts you mention really exist as far as the kernel is
> concerned. I mean.. a mmap file is file cache is .. etc.
> malloc/heap/stacks are also not differentiated too much and are mostly
> userspace policy (especially thread stacks). 
> 
> A split in
> * non-file backed
>   - mapped once
>   - mapped more than once
> * file backed
>   - mapped at least once
>   - not mapped
> I can see as being meaningful. Assigning meaning to it beyond this is
> dangerous; that is more an interpretation of the policy userspace
> happens to use for things and I think coding that into the kernel is a
> mistake.

You are right. I think, kernel should NOT try to distinguish more than
that. This would at least separate out most of the stuff anyway (with
few execeptions).

> 
> Knowing which files are in memory how much is, as debug feature,
> potentially quite useful for VM hackers to see how well the various VM
> algorithms work. I'm concerned about the performance impact (eg you can
> do it only once a day or so, not every 10 seconds) and about how to get
> this data out in a consistent way (after all, spewing this amount of
> debug info will in itself impact the vm balances)

Yes. I am worried about that too. We do have "mapping->nrpages"  to
represent how many of them are in cache. But getting to all mappings
(especially the ones we can't get to from any process - closed files)
and printing them is quite expensive and need to hold locks :(

Thanks,
Badari

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2005-12-01 16:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-30 18:57 Badari Pulavarty
2005-12-01  2:35 ` Hareesh Nagarajan
2005-12-01 15:20 ` Marcelo Tosatti
2005-12-01 15:59   ` Badari Pulavarty
2005-12-01 16:10     ` Arjan van de Ven
2005-12-01 16:23       ` Badari Pulavarty [this message]
2005-12-01 17:08       ` Marcelo Tosatti
2005-12-01 17:15         ` Badari Pulavarty
2005-12-01 17:21           ` Arjan van de Ven
2005-12-01 17:57             ` Marcelo Tosatti
2005-12-01 18:20               ` Badari Pulavarty
2005-12-02 22:15                 ` Frank Ch. Eigler
2005-12-02 22:31                   ` Badari Pulavarty
2005-12-02 22:46                     ` Frank Ch. Eigler
2005-12-02 23:46                       ` Badari Pulavarty
2005-12-01 18:24               ` Badari Pulavarty
2005-12-04 18:48           ` Martin J. Bligh
2005-12-01 17:19     ` Marcelo Tosatti
2005-12-01 17:31       ` Badari Pulavarty
2005-12-01 18:15         ` Marcelo Tosatti
2005-12-01 18:25           ` Badari Pulavarty
2005-12-01 16:00   ` Marcelo Tosatti
2005-12-01 21:16     ` Christoph Lameter
2005-12-02  0:13       ` Badari Pulavarty
2005-12-28  1:33   ` Marcelo Tosatti
2005-12-28 19:36     ` Tom Zanussi

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=1133454228.21429.11.camel@localhost.localdomain \
    --to=pbadari@us.ibm.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=marcelo.tosatti@cyclades.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