Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbcCWJuZ (ORCPT ); Wed, 23 Mar 2016 05:50:25 -0400 Received: from casper.infradead.org ([85.118.1.10]:46871 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751816AbcCWJuS (ORCPT ); Wed, 23 Mar 2016 05:50:18 -0400 Date: Wed, 23 Mar 2016 10:50:07 +0100 From: Peter Zijlstra To: Wang Nan Cc: 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: <20160323095007.GW6344@twins.programming.kicks-ass.net> References: <1457949585-191064-1-git-send-email-wangnan0@huawei.com> <1457949585-191064-4-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457949585-191064-4-git-send-email-wangnan0@huawei.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 19 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.