Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534AbcCWKJY (ORCPT ); Wed, 23 Mar 2016 06:09:24 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:55559 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751611AbcCWKJR (ORCPT ); Wed, 23 Mar 2016 06:09:17 -0400 Subject: Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end To: Peter Zijlstra References: <1457949585-191064-1-git-send-email-wangnan0@huawei.com> <1457949585-191064-4-git-send-email-wangnan0@huawei.com> <20160323095007.GW6344@twins.programming.kicks-ass.net> CC: , , He Kuang , Alexei Starovoitov , "Arnaldo Carvalho de Melo" , Brendan Gregg , "Jiri Olsa" , Masami Hiramatsu , Namhyung Kim , Zefan Li , From: "Wangnan (F)" Message-ID: <56F26B29.8040401@huawei.com> Date: Wed, 23 Mar 2016 18:08:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160323095007.GW6344@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.56F26B42.01C8,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 9391db4aa22c80e2fb0d9f397f38fd66 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1053 Lines: 27 On 2016/3/23 17:50, Peter Zijlstra wrote: > On Mon, Mar 14, 2016 at 09:59:43AM +0000, Wang Nan wrote: >> Convert perf_output_begin to __perf_output_begin and make the later >> function able to write records from the end of the ring buffer. >> Following commits will utilize the 'backward' flag. >> >> This patch doesn't introduce any extra performance overhead since we >> use always_inline. > So while I agree that with __always_inline and constant propagation we > _should_ end up with the same code, we have: > > $ size defconfig-build/kernel/events/ring_buffer.o.{pre,post} > text data bss dec hex filename > 3785 2 0 3787 ecb defconfig-build/kernel/events/ring_buffer.o.pre > 3673 2 0 3675 e5b defconfig-build/kernel/events/ring_buffer.o.post > > The patch actually makes the file shrink. > > So I think we still want to have some actual performance numbers. There are some numbers. You can find them from: http://lkml.iu.edu/hypermail/linux/kernel/1601.2/03966.html Thank you.