From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] mm/memcg: add unlikely to mercg->move_charge_at_immigrate Date: Mon, 18 Jun 2012 17:19:18 +0400 Message-ID: <4FDF2AD6.7060606@parallels.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: Johannes Weiner , Michal Hocko , Balbir Singh , KAMEZAWA Hiroyuki , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Gavin Shan On 06/18/2012 05:19 PM, 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." > Again, do you have any reason to optimize that ?