Skip to contentSkip to conversation

getrusage

DISCUSSION [email protected] 1 participant 1 message Aug 8, 1999 Memory management

lore
Share & tools
lore
#0 lore raw
Quoted 1 line

You need another [new entry]: a vm id.

I'm missing something here. Isn't the vmid implicit in the caller's context? That is, if I call getrusage, I'm asking about "my" vm statistics. /proc and gtop are sources of information about other contexts.

Quoted 8 lines

There is already a patch floating around on l-k that does that, although it reports via a /proc entry per process. Integrating it in rusage would be a nice addition. The possible unique ids are memory address of the kernel mm_struct (ugly, but zero cost), or the pid of the process who created the VM first.

If you do fix this, could you please make all these entries *unsigned* longs?

Taking a hint from Solaris' treatment of getrlimit, how 'bout:

typedef unsigned long rusage_t;

for the flexibility?

Is there interest in providing max values for the individual kinds of memory (shared/data/stack) in addition to the overall maxrss? It's not what I need, and other implementations don't provide it. They don't even provide current values, only useless "integrals".

By the sound of it, I have maybe a week to produce something acceptable if I want to see it in 2.4. Is that about right?

-dca
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/