public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* swap map
@ 2007-01-30 11:12 Howard Chu
  2007-01-30 11:20 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Howard Chu @ 2007-01-30 11:12 UTC (permalink / raw)
  To: linux-kernel

In the it-would-be-nice department... While I was twiddling with swappiness 
and benchmarking some code, I thought it would be pretty cool if there was a 
node in /proc/<pid> that would show which pages of a process are resident or 
nonresident. I'm not sure that it would be useful very often, but I was 
thinking one could get a snapshot of that, correlated with traces from a 
malloc profiler, to show what portions of a program's memory usage was in 
active use vs idle.
-- 
   -- Howard Chu
   Chief Architect, Symas Corp.  http://www.symas.com
   Director, Highland Sun        http://highlandsun.com/hyc
   OpenLDAP Core Team            http://www.openldap.org/project/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: swap map
  2007-01-30 11:12 swap map Howard Chu
@ 2007-01-30 11:20 ` Christoph Hellwig
  2007-01-30 11:33   ` Nick Piggin
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2007-01-30 11:20 UTC (permalink / raw)
  To: Howard Chu; +Cc: linux-kernel, linux-mm

On Tue, Jan 30, 2007 at 03:12:35AM -0800, Howard Chu wrote:
> In the it-would-be-nice department... While I was twiddling with swappiness 
> and benchmarking some code, I thought it would be pretty cool if there was 
> a node in /proc/<pid> that would show which pages of a process are resident 
> or nonresident. I'm not sure that it would be useful very often, but I was 
> thinking one could get a snapshot of that, correlated with traces from a 
> malloc profiler, to show what portions of a program's memory usage was in 
> active use vs idle.

That's be a remote mincore().  This should be more or less trivial,
do_mincore would need a mm_struct argument instead of always using
current->mm and we'd need a simple seq_file interface iterating over it.

Any volunteers?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: swap map
  2007-01-30 11:20 ` Christoph Hellwig
@ 2007-01-30 11:33   ` Nick Piggin
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Piggin @ 2007-01-30 11:33 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Howard Chu, linux-kernel, linux-mm

Christoph Hellwig wrote:
> On Tue, Jan 30, 2007 at 03:12:35AM -0800, Howard Chu wrote:
> 
>>In the it-would-be-nice department... While I was twiddling with swappiness 
>>and benchmarking some code, I thought it would be pretty cool if there was 
>>a node in /proc/<pid> that would show which pages of a process are resident 
>>or nonresident. I'm not sure that it would be useful very often, but I was 
>>thinking one could get a snapshot of that, correlated with traces from a 
>>malloc profiler, to show what portions of a program's memory usage was in 
>>active use vs idle.
> 
> 
> That's be a remote mincore().  This should be more or less trivial,
> do_mincore would need a mm_struct argument instead of always using
> current->mm and we'd need a simple seq_file interface iterating over it.
> 
> Any volunteers?

Well the first thing needed is an mincore that actually works for anonymous
memory!

I've implemented some fixups in that department, which should get merged
into 2.6.21. That reminds me: I'll send the patch to linux-mm for review...

We cannot get real atomic snapshots in general, but I don't think that would
be a problem if you are just doing some profiling.

-- 
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-01-30 11:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-30 11:12 swap map Howard Chu
2007-01-30 11:20 ` Christoph Hellwig
2007-01-30 11:33   ` Nick Piggin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox