Skip to contentSkip to conversation

use for page_state accounting fields

DISCUSSION Marcelo Tosatti 2 participants 4 messages Aug 16, 2004 Memory management

lore
Share & tools
lore
#0 lore raw

Hi Andrew,

I suppose you wrote the page_state per-CPU statistics structure.

There are some fields, for instance pgactivate/pgdeactivate, that do not seem to be used anywhere. Sure, they are useful for statistics, but no place in the kernel exports them to userspace AFAICS.

        unsigned long pgactivate;       /* pages moved inactive->active */
        unsigned long pgdeactivate;     /* pages moved active->inactive */

Counting them is somewhat expensive I believe (need to disable IRQ), based on the assumption that these days any cycle is a loss.

So, from my POV we should

a) export them to userspace
b) surround them by CONFIG_DEBUG_MMSTATS or something similar

Tell me I'm wrong.

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

#2 lore raw
In reply to Andrew Morton
Quoted 16 lines · Andrew Morton
Quoted 15 lines · Marcelo Tosatti

Hi Andrew,

I suppose you wrote the page_state per-CPU statistics structure.

There are some fields, for instance pgactivate/pgdeactivate, that do not seem to be used anywhere. Sure, they are useful for statistics, but no place in the kernel exports them to userspace AFAICS.

        unsigned long pgactivate;       /* pages moved inactive->active */
        unsigned long pgdeactivate;     /* pages moved active->inactive */

Counting them is somewhat expensive I believe (need to disable IRQ), based on the assumption that these days any cycle is a loss.

Quoted 8 lines
Quoted 6 lines

So, from my POV we should

a) export them to userspace
b) surround them by CONFIG_DEBUG_MMSTATS or something similar

Tell me I'm wrong.

Take a peek in /proc/vmstat ;)

Doh.

Is there any tool which reads these statistics and makes use of them? Number of inactivations/activations per timeframe, etc?

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

#1 lore raw
In reply to Marcelo Tosatti
Quoted 15 lines · Marcelo Tosatti

Hi Andrew,

I suppose you wrote the page_state per-CPU statistics structure.

There are some fields, for instance pgactivate/pgdeactivate, that do not seem to be used anywhere. Sure, they are useful for statistics, but no place in the kernel exports them to userspace AFAICS.

        unsigned long pgactivate;       /* pages moved inactive->active */
        unsigned long pgdeactivate;     /* pages moved active->inactive */

Counting them is somewhat expensive I believe (need to disable IRQ), based on the assumption that these days any cycle is a loss.

Quoted 6 lines

So, from my POV we should

a) export them to userspace
b) surround them by CONFIG_DEBUG_MMSTATS or something similar

Tell me I'm wrong.

Take a peek in /proc/vmstat ;)
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
In reply to Marcelo Tosatti
Quoted 7 lines · Marcelo Tosatti
Quoted 2 lines

Take a peek in /proc/vmstat ;)

Doh.

Is there any tool which reads these statistics and makes use of them? Number of inactivations/activations per timeframe, etc?

Not that I am aware of.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>