From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: nikita@clusterfs.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm counter operations through macros
Date: Mon, 14 Mar 2005 21:45:06 -0800 [thread overview]
Message-ID: <20050314214506.050efadf.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0503142103090.16582@schroedinger.engr.sgi.com>
Christoph Lameter <clameter@sgi.com> wrote:
>
> 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:
I don't think the MM_COUNTER_T macro adds much, really. How about this?
--- 25/include/linux/sched.h~mm-counter-operations-through-macros-tidy 2005-03-14 21:43:00.000000000 -0800
+++ 25-akpm/include/linux/sched.h 2005-03-14 21:43:00.000000000 -0800
@@ -210,7 +210,6 @@ extern void arch_unmap_area_topdown(stru
#define inc_mm_counter(mm, member) (mm)->_##member++
#define dec_mm_counter(mm, member) (mm)->_##member--
typedef unsigned long mm_counter_t;
-#define MM_COUNTER_T(member) mm_counter_t _##member
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
@@ -241,8 +240,8 @@ struct mm_struct {
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);
+ mm_counter_t _rss;
+ mm_counter_t _anon_rss;
unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
_
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Morton <akpm@osdl.org>
To: Christoph Lameter <clameter@sgi.com>
Cc: nikita@clusterfs.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm counter operations through macros
Date: Mon, 14 Mar 2005 21:45:06 -0800 [thread overview]
Message-ID: <20050314214506.050efadf.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0503142103090.16582@schroedinger.engr.sgi.com>
Christoph Lameter <clameter@sgi.com> wrote:
>
> 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:
I don't think the MM_COUNTER_T macro adds much, really. How about this?
--- 25/include/linux/sched.h~mm-counter-operations-through-macros-tidy 2005-03-14 21:43:00.000000000 -0800
+++ 25-akpm/include/linux/sched.h 2005-03-14 21:43:00.000000000 -0800
@@ -210,7 +210,6 @@ extern void arch_unmap_area_topdown(stru
#define inc_mm_counter(mm, member) (mm)->_##member++
#define dec_mm_counter(mm, member) (mm)->_##member--
typedef unsigned long mm_counter_t;
-#define MM_COUNTER_T(member) mm_counter_t _##member
struct mm_struct {
struct vm_area_struct * mmap; /* list of VMAs */
@@ -241,8 +240,8 @@ struct mm_struct {
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);
+ mm_counter_t _rss;
+ mm_counter_t _anon_rss;
unsigned long saved_auxv[42]; /* for /proc/PID/auxv */
_
--
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>
next prev parent reply other threads:[~2005-03-15 5:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-11 12:23 [PATCH] mm counter operations through macros Christoph Lameter
2005-03-11 12:23 ` Christoph Lameter
2005-03-11 18:25 ` Dave Jones
2005-03-11 18:25 ` Dave Jones
2005-03-11 19:04 ` Christoph Lameter
2005-03-11 19:04 ` Christoph Lameter
2005-03-11 22:52 ` Andrew Morton
2005-03-11 22:52 ` Andrew Morton
2005-03-12 0:35 ` Christoph Lameter
2005-03-12 0:35 ` Christoph Lameter
2005-03-12 13:57 ` Nikita Danilov
2005-03-12 13:57 ` Nikita Danilov
2005-03-15 5:04 ` Christoph Lameter
2005-03-15 5:04 ` Christoph Lameter
2005-03-15 5:45 ` Andrew Morton [this message]
2005-03-15 5:45 ` Andrew Morton
2005-03-15 5:50 ` Christoph Lameter
2005-03-15 5:50 ` Christoph Lameter
2005-03-15 5:59 ` Andrew Morton
2005-03-15 5:59 ` Andrew Morton
2005-03-15 6:10 ` Christoph Lameter
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=20050314214506.050efadf.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nikita@clusterfs.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.