Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755457AbcCWTZb (ORCPT ); Wed, 23 Mar 2016 15:25:31 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:36624 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbcCWTZ3 (ORCPT ); Wed, 23 Mar 2016 15:25:29 -0400 Date: Wed, 23 Mar 2016 12:25:24 -0700 From: Alexei Starovoitov To: "Wangnan (F)" Cc: Peter Zijlstra , mingo@redhat.com, linux-kernel@vger.kernel.org, He Kuang , Alexei Starovoitov , Arnaldo Carvalho de Melo , Brendan Gregg , Jiri Olsa , Masami Hiramatsu , Namhyung Kim , Zefan Li , pi3orama@163.com Subject: Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end Message-ID: <20160323192521.GA48575@ast-mbp.thefacebook.com> 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> <56F26B29.8040401@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56F26B29.8040401@huawei.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1449 Lines: 34 On Wed, Mar 23, 2016 at 06:08:41PM +0800, Wangnan (F) wrote: > > > 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 Wang, when you respin, please add all perf analysis that you've done and the reasons to do it this way to commit log to make sure it stays in git history. I've reviewed it in the past and looks like the patches didn't change over the last months. So still ack, I believe overwrite buffers is a great feature.