Re: [PATCH, RESEND] introduce get_mm_hiwater_xxx(), fixtaskstats->hiwater_xxx accounting

From: Andrew Morton
Date: Mon Dec 15 2008 - 19:22:25 EST


On Fri, 12 Dec 2008 15:05:24 +0100
Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
>

> --- K-28/include/linux/sched.h~HIWATER 2008-12-02 17:12:40.000000000 +0100
> +++ K-28/include/linux/sched.h 2008-12-03 18:17:18.000000000 +0100

grumble

> +#define get_mm_hiwater_rss(mm) max((mm)->hiwater_rss, get_mm_rss(mm))

This evaluates its argument thrice.

> +#define get_mm_hiwater_vm(mm) max((mm)->hiwater_vm, (mm)->total_vm)

This evaluates its argument twice.


was sched.h the appropriate header in which to implement these? Maybe...

But they're only ever _used_ in kernel/tsacct.c, so do they actually
need to be implemented in any .h file?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/