linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nikita Danilov <nikita@clusterfs.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@osdl.org
Subject: Re: [PATCH] mm counter operations through macros
Date: Sat, 12 Mar 2005 16:57:35 +0300	[thread overview]
Message-ID: <16946.62799.737502.923025@gargle.gargle.HOWL> (raw)
In-Reply-To: <Pine.LNX.4.58.0503111103200.22240@schroedinger.engr.sgi.com>

Christoph Lameter writes:
 > On Fri, 11 Mar 2005, Dave Jones wrote:
 > 
 > > Splitting this last one into inc_mm_counter() and dec_mm_counter()
 > > means you can kill off the last argument, and get some of the
 > > readability back. As it stands, I think this patch adds a bunch
 > > of obfuscation for no clear benefit.
 > 
 > Ok.
 > -----------------------------------------------------------------
 > This patch extracts all the operations on counters protected by the
 > page table lock (currently rss and anon_rss) into definitions in
 > include/linux/sched.h. All rss operations are performed through
 > the following macros:
 > 
 > get_mm_counter(mm, member)		-> Obtain the value of a counter
 > set_mm_counter(mm, member, value)	-> Set the value of a counter
 > update_mm_counter(mm, member, value)	-> Add to a counter

A nitpick, but wouldn't be it clearer to call it add_mm_counter()? As an
additional bonus this matches atomic_{inc,dec,add}() and makes macro
names more uniform.

 > inc_mm_counter(mm, member)		-> Increment a counter
 > dec_mm_counter(mm, member)		-> Decrement a counter

Nikita.
--
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>

  parent reply	other threads:[~2005-03-12 13:57 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
2005-03-12 13:57     ` Nikita Danilov [this message]
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=16946.62799.737502.923025@gargle.gargle.HOWL \
    --to=nikita@clusterfs.com \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.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