[lkml]   [2001]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] VM statistics code
Marcelo Tosatti wrote:
> Hi Linus,
> The following patch adds detailed VM statistics (reported via /proc/stats)
> which is tunable on/off by the CONFIG_VM_STATS option.

We need this, bad. Two suggested changes:

> +#define VM_STAT_INC_PTEUNMAP(zone) zone->stat.vm_pteunmap++;

All these macros are a waste of space :)

Much better to have:

#define VM_STAT_ZONE(zone, op) zone->stat.op

Then, at the call site:

VM_STAT_ZONE(some_zone, vm_pteunmap++);

Or, if you prefer,

#define VM_STAT_ZONE_INC(zone, field) zone->field++

That way, you don't have to add a new macro each time
you add a new field.

Also, a sysrq key which dumps the stats out, please - when
your box has wedged there ain't no way you'll be running

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:57    [W:0.057 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site