linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Andrew Morton <akpm@osdl.org>
Cc: davej@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm counter operations through macros
Date: Fri, 11 Mar 2005 16:35:19 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0503111633410.23976@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <20050311145226.6ee4a951.akpm@osdl.org>

On Fri, 11 Mar 2005, Andrew Morton wrote:

> > +#define set_mm_counter(mm, member, value) (mm)->member = (value)
> > +#define get_mm_counter(mm, member) ((mm)->member)
> > +#define update_mm_counter(mm, member, value) (mm)->member += (value)
> > +#define inc_mm_counter(mm, member) (mm)->member++
> > +#define dec_mm_counter(mm, member) (mm)->member--
> > +#define MM_COUNTER_T unsigned long
>
> Would prefer `mm_counter_t' here.
>
> Why not a typedef?

Ok typedef it is.

> > @@ -231,9 +237,13 @@ struct mm_struct {
> >  	unsigned long start_code, end_code, start_data, end_data;
> >  	unsigned long start_brk, brk, start_stack;
> >  	unsigned long arg_start, arg_end, env_start, env_end;
> > -	unsigned long rss, anon_rss, total_vm, locked_vm, shared_vm;
> > +	unsigned long total_vm, locked_vm, shared_vm;
> >  	unsigned long exec_vm, stack_vm, reserved_vm, def_flags, nr_ptes;
> >
> > +	/* Special counters protected by the page_table_lock */
> > +	MM_COUNTER_T rss;
> > +	MM_COUNTER_T anon_rss;
> > +
>
> Why were only two counters converted?

Because only these two counters are protected by the page table lock.

> Could I suggest that you rename all these counters, so that code which
> fails to use the macros won't compile?

Ok. will make them mm_xx as they were in previous patches.

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

  reply	other threads:[~2005-03-12  0:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-11 12:23 Christoph Lameter
2005-03-11 18:25 ` Dave Jones
2005-03-11 19:04   ` Christoph Lameter
2005-03-11 22:52     ` Andrew Morton
2005-03-12  0:35       ` Christoph Lameter [this message]
2005-03-12 13:57     ` Nikita Danilov
2005-03-15  5:04       ` Christoph Lameter
2005-03-15  5:45         ` Andrew Morton
2005-03-15  5:50           ` Christoph Lameter
2005-03-15  5:59             ` Andrew Morton
2005-03-15  6:10               ` Christoph Lameter

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=Pine.LNX.4.58.0503111633410.23976@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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