From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tejun Heo Subject: Re: [PATCH 2/6] add res_counter_uncharge_until() Date: Mon, 14 May 2012 11:17:25 -0700 Message-ID: <20120514181725.GF2366@google.com> References: <4FACDED0.3020400@jp.fujitsu.com> <4FACE01A.4040405@jp.fujitsu.com> <20120511141945.c487e94c.akpm@linux-foundation.org> <4FB05B8F.8020408@jp.fujitsu.com> <4FB0DF4A.5010506@jp.fujitsu.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=GK6jHJfsQs6Z7IOYzDGF33psCG+fq0NS+gdLb9MMAhQ=; b=gcaH19Q4LP0X1t0QqMpVXX3ocygvZi/ussRRmwPj2nkkXMPojCQtJD1T3eASnUWWvI chl+8scL1fjz4N+JFpuE2X+cryUbmUGCmip284jmTIgdG+hkJ7GGYmV0oQaAF/TuU1Gd unDKIEKM2uiVS+26xNOMehvMWwcnSB5BLITXDlGtssQ5Azqsn8xfuzQZibKIQB5O5PMP /etXgz9BJ+adi7MaBf+w3w7jp1pjofwMn19CFQGrMTlpH1Tk5sEqhpmvoZRMuB/k2mo8 b0UObHYWvmhwRfY6dL6SEIjSz3RdUnBCuW8A23T8U98XMvPNNk74+nhomG5NDmnKmjYR 34lA== Content-Disposition: inline In-Reply-To: <4FB0DF4A.5010506-+CUm20s59erQFUHtdCDX3A@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: KAMEZAWA Hiroyuki Cc: Frederic Weisbecker , Andrew Morton , "linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org" , "cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Michal Hocko , Johannes Weiner , Han Ying , Glauber Costa , "Aneesh Kumar K.V" , Hiroyuki Kamezawa , Linux Kernel On Mon, May 14, 2012 at 07:32:42PM +0900, KAMEZAWA Hiroyuki wrote: > [PATCH 2/6] memcg: add res_counter_uncharge_until() > > From: Frederic Weisbecker > > At killing res_counter which is a child of other counter, > we need to do > res_counter_uncharge(child, xxx) > res_counter_charge(parent, xxx) > > This is not atomic and wasting cpu. This patch adds > res_counter_uncharge_until(). This function's uncharge propagates > to ancestors until specified res_counter. > > res_counter_uncharge_until(child, parent, xxx) > > Now, ops is atomic and efficient. > > Changelog since v2 > - removed unnecessary lines. > - added 'From' , this patch comes from his one. > > Signed-off-by: Frederic Weisbecker > Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Tejun Heo Thanks. -- tejun From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx197.postini.com [74.125.245.197]) by kanga.kvack.org (Postfix) with SMTP id 8D9896B00F7 for ; Mon, 14 May 2012 14:17:30 -0400 (EDT) Received: by pbbrp2 with SMTP id rp2so9277853pbb.14 for ; Mon, 14 May 2012 11:17:29 -0700 (PDT) Date: Mon, 14 May 2012 11:17:25 -0700 From: Tejun Heo Subject: Re: [PATCH 2/6] add res_counter_uncharge_until() Message-ID: <20120514181725.GF2366@google.com> References: <4FACDED0.3020400@jp.fujitsu.com> <4FACE01A.4040405@jp.fujitsu.com> <20120511141945.c487e94c.akpm@linux-foundation.org> <4FB05B8F.8020408@jp.fujitsu.com> <4FB0DF4A.5010506@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB0DF4A.5010506@jp.fujitsu.com> Sender: owner-linux-mm@kvack.org List-ID: To: KAMEZAWA Hiroyuki Cc: Frederic Weisbecker , Andrew Morton , "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Han Ying , Glauber Costa , "Aneesh Kumar K.V" , Hiroyuki Kamezawa , Linux Kernel On Mon, May 14, 2012 at 07:32:42PM +0900, KAMEZAWA Hiroyuki wrote: > [PATCH 2/6] memcg: add res_counter_uncharge_until() > > From: Frederic Weisbecker > > At killing res_counter which is a child of other counter, > we need to do > res_counter_uncharge(child, xxx) > res_counter_charge(parent, xxx) > > This is not atomic and wasting cpu. This patch adds > res_counter_uncharge_until(). This function's uncharge propagates > to ancestors until specified res_counter. > > res_counter_uncharge_until(child, parent, xxx) > > Now, ops is atomic and efficient. > > Changelog since v2 > - removed unnecessary lines. > - added 'From' , this patch comes from his one. > > Signed-off-by: Frederic Weisbecker > Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Tejun Heo Thanks. -- tejun -- 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757496Ab2ENSRc (ORCPT ); Mon, 14 May 2012 14:17:32 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:36299 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755934Ab2ENSRa (ORCPT ); Mon, 14 May 2012 14:17:30 -0400 Date: Mon, 14 May 2012 11:17:25 -0700 From: Tejun Heo To: KAMEZAWA Hiroyuki Cc: Frederic Weisbecker , Andrew Morton , "linux-mm@kvack.org" , "cgroups@vger.kernel.org" , Michal Hocko , Johannes Weiner , Han Ying , Glauber Costa , "Aneesh Kumar K.V" , Hiroyuki Kamezawa , Linux Kernel Subject: Re: [PATCH 2/6] add res_counter_uncharge_until() Message-ID: <20120514181725.GF2366@google.com> References: <4FACDED0.3020400@jp.fujitsu.com> <4FACE01A.4040405@jp.fujitsu.com> <20120511141945.c487e94c.akpm@linux-foundation.org> <4FB05B8F.8020408@jp.fujitsu.com> <4FB0DF4A.5010506@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4FB0DF4A.5010506@jp.fujitsu.com> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2012 at 07:32:42PM +0900, KAMEZAWA Hiroyuki wrote: > [PATCH 2/6] memcg: add res_counter_uncharge_until() > > From: Frederic Weisbecker > > At killing res_counter which is a child of other counter, > we need to do > res_counter_uncharge(child, xxx) > res_counter_charge(parent, xxx) > > This is not atomic and wasting cpu. This patch adds > res_counter_uncharge_until(). This function's uncharge propagates > to ancestors until specified res_counter. > > res_counter_uncharge_until(child, parent, xxx) > > Now, ops is atomic and efficient. > > Changelog since v2 > - removed unnecessary lines. > - added 'From' , this patch comes from his one. > > Signed-off-by: Frederic Weisbecker > Signed-off-by: KAMEZAWA Hiroyuki Acked-by: Tejun Heo Thanks. -- tejun