From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx157.postini.com [74.125.245.157]) by kanga.kvack.org (Postfix) with SMTP id DDDD86B005A for ; Mon, 16 Jul 2012 04:06:07 -0400 (EDT) Date: Mon, 16 Jul 2012 10:06:03 +0200 From: Michal Hocko Subject: Re: [PATCH mmotm] mm, oom: reduce dependency on tasklist_lock: fix Message-ID: <20120716080603.GA14664@tiehlicka.suse.cz> References: <20120713143206.GA4511@tiehlicka.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Hugh Dickins Cc: Andrew Morton , David Rientjes , KAMEZAWA Hiroyuki , Johannes Weiner , KOSAKI Motohiro , Minchan Kim , Oleg Nesterov , linux-mm@kvack.org, cgroups@vger.kernel.org On Mon 16-07-12 00:42:37, Hugh Dickins wrote: > Slab poisoning gave me a General Protection Fault on the > atomic_dec(&__task_cred(p)->user->processes); > line of release_task() called from wait_task_zombie(), > every time my dd to USB testing generated a memcg OOM. Just curious, was it with the wait-on-pagereclaim patch? > oom_kill_process() now does the put_task_struct(), > mem_cgroup_out_of_memory() should not repeat it. Good catch. I have missed that during review - my bad... > > Signed-off-by: Hugh Dickins Acked-by: Michal Hocko > --- > > mm/memcontrol.c | 1 - > 1 file changed, 1 deletion(-) > > --- mmotm/mm/memcontrol.c 2012-07-11 14:50:29.808349013 -0700 > +++ linux/mm/memcontrol.c 2012-07-15 12:21:26.234289161 -0700 > @@ -1533,7 +1533,6 @@ void mem_cgroup_out_of_memory(struct mem > points = chosen_points * 1000 / totalpages; > oom_kill_process(chosen, gfp_mask, order, points, totalpages, memcg, > NULL, "Memory cgroup out of memory"); > - put_task_struct(chosen); > } > > static unsigned long mem_cgroup_reclaim(struct mem_cgroup *memcg, > -- > To unsubscribe from this list: send the line "unsubscribe cgroups" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic -- 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: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH mmotm] mm, oom: reduce dependency on tasklist_lock: fix Date: Mon, 16 Jul 2012 10:06:03 +0200 Message-ID: <20120716080603.GA14664@tiehlicka.suse.cz> References: <20120713143206.GA4511@tiehlicka.suse.cz> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Hugh Dickins Cc: Andrew Morton , David Rientjes , KAMEZAWA Hiroyuki , Johannes Weiner , KOSAKI Motohiro , Minchan Kim , Oleg Nesterov , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon 16-07-12 00:42:37, Hugh Dickins wrote: > Slab poisoning gave me a General Protection Fault on the > atomic_dec(&__task_cred(p)->user->processes); > line of release_task() called from wait_task_zombie(), > every time my dd to USB testing generated a memcg OOM. Just curious, was it with the wait-on-pagereclaim patch? > oom_kill_process() now does the put_task_struct(), > mem_cgroup_out_of_memory() should not repeat it. Good catch. I have missed that during review - my bad... > > Signed-off-by: Hugh Dickins Acked-by: Michal Hocko > --- > > mm/memcontrol.c | 1 - > 1 file changed, 1 deletion(-) > > --- mmotm/mm/memcontrol.c 2012-07-11 14:50:29.808349013 -0700 > +++ linux/mm/memcontrol.c 2012-07-15 12:21:26.234289161 -0700 > @@ -1533,7 +1533,6 @@ void mem_cgroup_out_of_memory(struct mem > points = chosen_points * 1000 / totalpages; > oom_kill_process(chosen, gfp_mask, order, points, totalpages, memcg, > NULL, "Memory cgroup out of memory"); > - put_task_struct(chosen); > } > > static unsigned long mem_cgroup_reclaim(struct mem_cgroup *memcg, > -- > To unsubscribe from this list: send the line "unsubscribe cgroups" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Michal Hocko SUSE Labs SUSE LINUX s.r.o. Lihovarska 1060/12 190 00 Praha 9 Czech Republic