From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail191.messagelabs.com (mail191.messagelabs.com [216.82.242.19]) by kanga.kvack.org (Postfix) with ESMTP id 41206900086 for ; Mon, 18 Apr 2011 13:42:02 -0400 (EDT) Received: from kpbe12.cbf.corp.google.com (kpbe12.cbf.corp.google.com [172.25.105.76]) by smtp-out.google.com with ESMTP id p3IHfrmu022372 for ; Mon, 18 Apr 2011 10:41:53 -0700 Received: from qyg14 (qyg14.prod.google.com [10.241.82.142]) by kpbe12.cbf.corp.google.com with ESMTP id p3IHdNvc028088 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 18 Apr 2011 10:41:51 -0700 Received: by qyg14 with SMTP id 14so3155176qyg.19 for ; Mon, 18 Apr 2011 10:41:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1302909815-4362-1-git-send-email-yinghan@google.com> <1302909815-4362-10-git-send-email-yinghan@google.com> Date: Mon, 18 Apr 2011 10:41:51 -0700 Message-ID: Subject: Re: [PATCH V5 09/10] Add API to export per-memcg kswapd pid. From: Ying Han Content-Type: multipart/alternative; boundary=20cf300fab971cccc604a134e87c Sender: owner-linux-mm@kvack.org List-ID: To: Minchan Kim Cc: KOSAKI Motohiro , Daisuke Nishimura , Balbir Singh , Tejun Heo , Pavel Emelyanov , KAMEZAWA Hiroyuki , Andrew Morton , Li Zefan , Mel Gorman , Christoph Lameter , Johannes Weiner , Rik van Riel , Hugh Dickins , Michal Hocko , Dave Hansen , Zhu Yanhai , linux-mm@kvack.org --20cf300fab971cccc604a134e87c Content-Type: text/plain; charset=ISO-8859-1 On Sun, Apr 17, 2011 at 10:01 PM, Minchan Kim wrote: > On Sat, Apr 16, 2011 at 8:23 AM, Ying Han wrote: > > This add the API which exports per-memcg kswapd thread pid. The kswapd > > thread is named as "memcg_" + css_id, and the pid can be used to put > > kswapd thread into cpu cgroup later. > > > > $ mkdir /dev/cgroup/memory/A > > $ cat /dev/cgroup/memory/A/memory.kswapd_pid > > memcg_null 0 > > > > $ echo 500m >/dev/cgroup/memory/A/memory.limit_in_bytes > > $ echo 50m >/dev/cgroup/memory/A/memory.high_wmark_distance > > $ ps -ef | grep memcg > > root 6727 2 0 14:32 ? 00:00:00 [memcg_3] > > root 6729 6044 0 14:32 ttyS0 00:00:00 grep memcg > > > > $ cat memory.kswapd_pid > > memcg_3 6727 > > > > changelog v5..v4 > > 1. Initialize the memcg-kswapd pid to -1 instead of 0. > > 2. Remove the kswapds_spinlock. > > > > changelog v4..v3 > > 1. Add the API based on KAMAZAWA's request on patch v3. > > > > Reviewed-by: KAMEZAWA Hiroyuki > > Signed-off-by: Ying Han > > --- > > include/linux/swap.h | 2 ++ > > mm/memcontrol.c | 31 +++++++++++++++++++++++++++++++ > > 2 files changed, 33 insertions(+), 0 deletions(-) > > > > diff --git a/include/linux/swap.h b/include/linux/swap.h > > index 319b800..2d3e21a 100644 > > --- a/include/linux/swap.h > > +++ b/include/linux/swap.h > > @@ -34,6 +34,8 @@ struct kswapd { > > }; > > > > int kswapd(void *p); > > +extern spinlock_t kswapds_spinlock; > > Remove spinlock. > Thanks. Will remove from the next post. --Ying > > > > -- > Kind regards, > Minchan Kim > --20cf300fab971cccc604a134e87c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Sun, Apr 17, 2011 at 10:01 PM, Mincha= n Kim <mincha= n.kim@gmail.com> wrote:
On Sat, Apr 16, 2011 at 8:23 AM, Ying Han= <yinghan@google.com> wrote= :
> This add the API which exports per-memcg kswapd thread pid. The kswapd=
> thread is named as "memcg_" + css_id, and the pid can be use= d to put
> kswapd thread into cpu cgroup later.
>
> $ mkdir /dev/cgroup/memory/A
> $ cat /dev/cgroup/memory/A/memory.kswapd_pid
> memcg_null 0
>
> $ echo 500m >/dev/cgroup/memory/A/memory.limit_in_bytes
> $ echo 50m >/dev/cgroup/memory/A/memory.high_wmark_distance
> $ ps -ef | grep memcg
> root =A0 =A0 =A06727 =A0 =A0 2 =A00 14:32 ? =A0 =A0 =A0 =A000:00:00 [m= emcg_3]
> root =A0 =A0 =A06729 =A06044 =A00 14:32 ttyS0 =A0 =A000:00:00 grep mem= cg
>
> $ cat memory.kswapd_pid
> memcg_3 6727
>
> changelog v5..v4
> 1. Initialize the memcg-kswapd pid to -1 instead of 0.
> 2. Remove the kswapds_spinlock.
>
> changelog v4..v3
> 1. Add the API based on KAMAZAWA's request on patch v3.
>
> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Signed-off-by: Ying Han <ying= han@google.com>
> ---
> =A0include/linux/swap.h | =A0 =A02 ++
> =A0mm/memcontrol.c =A0 =A0 =A0| =A0 31 +++++++++++++++++++++++++++++++=
> =A02 files changed, 33 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/swap.h b/include/linux/swap.h
> index 319b800..2d3e21a 100644
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -34,6 +34,8 @@ struct kswapd {
> =A0};
>
> =A0int kswapd(void *p);
> +extern spinlock_t kswapds_spinlock;

Remove spinlock.

Thanks. Wi= ll remove from the next post.

--Ying=A0



--
Kind regards,
Minchan Kim

--20cf300fab971cccc604a134e87c-- -- 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/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org