From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamezawa Hiroyuki Subject: Re: [PATCH] mm/memcg: add unlikely to mercg->move_charge_at_immigrate Date: Tue, 19 Jun 2012 09:02:01 +0900 Message-ID: <4FDFC179.3050203@jp.fujitsu.com> References: <1340025022-7272-1-git-send-email-liwp.linux@gmail.com> <4FDF2890.3020004@parallels.com> <20120618131918.GA2600@kernel> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20120618131918.GA2600@kernel> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Wanpeng Li Cc: Glauber Costa , Johannes Weiner , Michal Hocko , Balbir Singh , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Gavin Shan (2012/06/18 22:19), Wanpeng Li wrote: > On Mon, Jun 18, 2012 at 05:09:36PM +0400, Glauber Costa wrote: >> On 06/18/2012 05:10 PM, Wanpeng Li wrote: >>> From: Wanpeng Li >>> >>> move_charge_at_immigrate feature is disabled by default. Charges >>> are moved only when you move mm->owner and it also add additional >>> overhead. >> >> How big is this overhead? >> >> That's hardly a fast path. And if it happens to matter, it will be >> just bigger when you enable it, and the compiler start giving the >> wrong hints to the code. > > Thank you for your quick response. > > Oh, Maybe I should just write comments "move_charge_at_immigrate feature > is disabled by default. So add "unlikely", in order to compiler can optimize." > This doesn't affect the performance. likely/unlikely which doesn't affect performance is never welcomed. Thanks, -Kame 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 D23C76B0062 for ; Mon, 18 Jun 2012 20:05:24 -0400 (EDT) Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id C5D363EE0C0 for ; Tue, 19 Jun 2012 09:05:22 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id AD2EA45DE4F for ; Tue, 19 Jun 2012 09:05:22 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 7F96E45DE52 for ; Tue, 19 Jun 2012 09:05:22 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 72F2EE08006 for ; Tue, 19 Jun 2012 09:05:22 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.240.81.133]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 1E75F1DB803F for ; Tue, 19 Jun 2012 09:05:22 +0900 (JST) Message-ID: <4FDFC179.3050203@jp.fujitsu.com> Date: Tue, 19 Jun 2012 09:02:01 +0900 From: Kamezawa Hiroyuki MIME-Version: 1.0 Subject: Re: [PATCH] mm/memcg: add unlikely to mercg->move_charge_at_immigrate References: <1340025022-7272-1-git-send-email-liwp.linux@gmail.com> <4FDF2890.3020004@parallels.com> <20120618131918.GA2600@kernel> In-Reply-To: <20120618131918.GA2600@kernel> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Wanpeng Li Cc: Glauber Costa , Johannes Weiner , Michal Hocko , Balbir Singh , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gavin Shan (2012/06/18 22:19), Wanpeng Li wrote: > On Mon, Jun 18, 2012 at 05:09:36PM +0400, Glauber Costa wrote: >> On 06/18/2012 05:10 PM, Wanpeng Li wrote: >>> From: Wanpeng Li >>> >>> move_charge_at_immigrate feature is disabled by default. Charges >>> are moved only when you move mm->owner and it also add additional >>> overhead. >> >> How big is this overhead? >> >> That's hardly a fast path. And if it happens to matter, it will be >> just bigger when you enable it, and the compiler start giving the >> wrong hints to the code. > > Thank you for your quick response. > > Oh, Maybe I should just write comments "move_charge_at_immigrate feature > is disabled by default. So add "unlikely", in order to compiler can optimize." > This doesn't affect the performance. likely/unlikely which doesn't affect performance is never welcomed. Thanks, -Kame -- 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 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753763Ab2FSAFZ (ORCPT ); Mon, 18 Jun 2012 20:05:25 -0400 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:40128 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752946Ab2FSAFY (ORCPT ); Mon, 18 Jun 2012 20:05:24 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4FDFC179.3050203@jp.fujitsu.com> Date: Tue, 19 Jun 2012 09:02:01 +0900 From: Kamezawa Hiroyuki User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Wanpeng Li CC: Glauber Costa , Johannes Weiner , Michal Hocko , Balbir Singh , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Gavin Shan Subject: Re: [PATCH] mm/memcg: add unlikely to mercg->move_charge_at_immigrate References: <1340025022-7272-1-git-send-email-liwp.linux@gmail.com> <4FDF2890.3020004@parallels.com> <20120618131918.GA2600@kernel> In-Reply-To: <20120618131918.GA2600@kernel> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (2012/06/18 22:19), Wanpeng Li wrote: > On Mon, Jun 18, 2012 at 05:09:36PM +0400, Glauber Costa wrote: >> On 06/18/2012 05:10 PM, Wanpeng Li wrote: >>> From: Wanpeng Li >>> >>> move_charge_at_immigrate feature is disabled by default. Charges >>> are moved only when you move mm->owner and it also add additional >>> overhead. >> >> How big is this overhead? >> >> That's hardly a fast path. And if it happens to matter, it will be >> just bigger when you enable it, and the compiler start giving the >> wrong hints to the code. > > Thank you for your quick response. > > Oh, Maybe I should just write comments "move_charge_at_immigrate feature > is disabled by default. So add "unlikely", in order to compiler can optimize." > This doesn't affect the performance. likely/unlikely which doesn't affect performance is never welcomed. Thanks, -Kame