linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Minchan Kim <minchan.kim@gmail.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	cl@linux-foundation.org, minchan.kim@gmail.com,
	Lee.Schermerhorn@hp.com
Subject: Re: [mmotm][PATCH 1/5] clean up mm_counter
Date: Wed, 16 Dec 2009 08:25:29 +0900	[thread overview]
Message-ID: <20091216082529.8fc0d3c4.minchan.kim@barrios-desktop> (raw)
In-Reply-To: <20091215181116.ee2c31f7.kamezawa.hiroyu@jp.fujitsu.com>

On Tue, 15 Dec 2009 18:11:16 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> 
> Now, per-mm statistics counter is defined by macro in sched.h
> 
> This patch modifies it to
>   - defined in mm.h as inlinf functions
>   - use array instead of macro's name creation.
> 
> This patch is for reducing patch size in future patch to modify
> implementation of per-mm counter.
> 
> Changelog: 2009/12/14
>  - added a struct rss_stat instead of bare counters.
>  - use memset instead of for() loop.
>  - rewrite macros into static inline functions.
> 
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
>  fs/proc/task_mmu.c       |    4 -
>  include/linux/mm.h       |  104 +++++++++++++++++++++++++++++++++++++++++++++++
>  include/linux/mm_types.h |   33 +++++++++-----
>  include/linux/sched.h    |   54 ------------------------
>  kernel/fork.c            |    3 -
>  kernel/tsacct.c          |    1 
>  mm/filemap_xip.c         |    2 
>  mm/fremap.c              |    2 
>  mm/memory.c              |   56 +++++++++++++++----------
>  mm/oom_kill.c            |    4 -
>  mm/rmap.c                |   10 ++--
>  mm/swapfile.c            |    2 
>  12 files changed, 174 insertions(+), 101 deletions(-)
> 
> Index: mmotm-2.6.32-Dec8-pth/include/linux/mm.h
> ===================================================================
> --- mmotm-2.6.32-Dec8-pth.orig/include/linux/mm.h
> +++ mmotm-2.6.32-Dec8-pth/include/linux/mm.h
> @@ -868,6 +868,110 @@ extern int mprotect_fixup(struct vm_area
>   */
>  int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
>  			  struct page **pages);
> +/*
> + * per-process(per-mm_struct) statistics.
> + */
> +#if USE_SPLIT_PTLOCKS
> +/*
> + * The mm counters are not protected by its page_table_lock,
> + * so must be incremented atomically.
> + */
> +static inline void set_mm_counter(struct mm_struct *mm, int member, long value)
> +{
> +	atomic_long_set(&mm->rss_stat.count[member], value);
> +}

I can't find mm->rss_stat in this patch.
Maybe it's part of next patch. 
It could break bisect.

Otherwise, Looks good to me. 

Reviewed-by: Minchan Kim <minchan.kim@gmail.com>

-- 
Kind regards,
Minchan Kim

--
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:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2009-12-15 23:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-15  9:09 [mmotm][PATCH 0/5] mm rss counting updates KAMEZAWA Hiroyuki
2009-12-15  9:11 ` [mmotm][PATCH 1/5] clean up mm_counter KAMEZAWA Hiroyuki
2009-12-15 23:25   ` Minchan Kim [this message]
2009-12-15 23:53     ` KAMEZAWA Hiroyuki
2009-12-15  9:13 ` [mmotm][PATCH 2/5] mm : avoid false sharing on mm_counter KAMEZAWA Hiroyuki
2009-12-15 15:25   ` Christoph Lameter
2009-12-15 16:54     ` KAMEZAWA Hiroyuki
2009-12-15 23:48     ` Minchan Kim
2009-12-15  9:14 ` [mmotm][PATCH 3/5] mm: count swap usage KAMEZAWA Hiroyuki
2009-12-15  9:15 ` [mmotm][PATCH 4/5] mm : add lowmem detection logic KAMEZAWA Hiroyuki
2009-12-15  9:16 ` [mmotm][PATCH 5/5] mm : count lowmem rss KAMEZAWA Hiroyuki

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=20091216082529.8fc0d3c4.minchan.kim@barrios-desktop \
    --to=minchan.kim@gmail.com \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.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