public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: balbir@linux.vnet.ibm.com, hugh@veritas.com, jlan@sgi.com,
	jpirko@redhat.com, jlim@sgi.com, kosaki.motohiro@jp.fujitsu.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH, RESEND] introduce get_mm_hiwater_xxx(), fix taskstats->hiwater_xxx accounting
Date: Tue, 16 Dec 2008 11:36:26 +0100	[thread overview]
Message-ID: <20081216103626.GA3964@redhat.com> (raw)
In-Reply-To: <20081215162148.87fd38a5.akpm@linux-foundation.org>

On 12/15, Andrew Morton wrote:
>
> On Fri, 12 Dec 2008 15:05:24 +0100
> Oleg Nesterov <oleg@redhat.com> wrote:
>
> > +#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.

I thought that any user should be careful anyway...

OK, agreed, will send the cleanup.

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

Just because I'd like to put them near update_hiwater_xxx()

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

Jiri cooks the patch which implements rusage->ru_maxrss accounting,
it will use the first helper.

Oleg.


  reply	other threads:[~2008-12-16 10:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-12 14:05 [PATCH, RESEND] introduce get_mm_hiwater_xxx(), fix taskstats->hiwater_xxx accounting Oleg Nesterov
2008-12-12 15:56 ` Hugh Dickins
2008-12-13  2:34 ` KOSAKI Motohiro
2008-12-13  3:48   ` Balbir Singh
2008-12-16  0:21 ` Andrew Morton
2008-12-16 10:36   ` Oleg Nesterov [this message]
2008-12-16 10:43   ` Jiri Pirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081216103626.GA3964@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=hugh@veritas.com \
    --cc=jlan@sgi.com \
    --cc=jlim@sgi.com \
    --cc=jpirko@redhat.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox