Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752413AbcC0Pbn (ORCPT ); Sun, 27 Mar 2016 11:31:43 -0400 Received: from m12-15.163.com ([220.181.12.15]:44096 "EHLO m12-15.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbcC0Pbl convert rfc822-to-8bit (ORCPT ); Sun, 27 Mar 2016 11:31:41 -0400 Content-Type: text/plain; charset=gb2312 Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 3/5] perf core: Prepare writing into ring buffer from end From: pi3orama X-Mailer: iPhone Mail (13E233) In-Reply-To: <20160327152005.GU6356@twins.programming.kicks-ass.net> Date: Sun, 27 Mar 2016 23:30:19 +0800 Cc: "Wangnan (F)" , 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 Content-Transfer-Encoding: 8BIT Message-Id: <73914DEA-D304-4997-9CEA-9689E3BAA7BE@163.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> <56F52E83.70409@huawei.com> <56F530C1.9010106@huawei.com> <56F547CC.5000408@huawei.com> <20160327152005.GU6356@twins.programming.kicks-ass.net> To: Peter Zijlstra X-CM-TRANSID: D8CowECJDkGK_PdWk0orAA--.7858S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Wr18Xr1xtw4xuw4Utw1DKFg_yoW8Jr1xpF WIga1jkr4kJFWFkrZFyrWqqryFqr97Xw17Wa4DG3yxAw1UWFy7Jr47tr95Ca4Dtws3Kr45 KF4rX34F9r1Fva7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07bzXd8UUUUU= X-Originating-IP: [123.150.104.144] X-CM-SenderInfo: lslt02xdpdqiywtou0bp/1tbiNAw5QFaDkrRn4wAAs2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 45 ?????ҵ? iPhone > ?? 2016??3??27?գ?????11:20??Peter Zijlstra д???? > > On Fri, Mar 25, 2016 at 10:14:36PM +0800, Wangnan (F) wrote: >>>> I think you enabled some unusual config options? > > x86_64-defconfig > >>> You must enabled CONFIG_OPTIMIZE_INLINING. Now I get similar result: > > It has that indeed. > >> After enabling CONFIG_OPTIMIZE_INLINING: >> >> Test its performance by calling 'close(-1)' for 3000000 times and >> use 'perf record -o /dev/null -e raw_syscalls:* test-ring-buffer' to >> capture system calls: >> >> MEAN STDVAR >> BASE 800077.1 23448.13 >> RAWPERF.PRE 2465858.0 603473.70 >> RAWPERF.POST 2471925.0 609437.60 >> >> Considering the high stdvar, after applying this patch the performance >> is not change. > > Why is your variance so immense? And doesn't that render the > measurements pointless? > For some unknown reason, about 10% of these results raises 2 times of normal results. Say, "normal results" are about 2200000, but those "outliers" are about 4400000 (I can't access raw data now). Variance becomes much smaller if I remove those outliers. I guess the outliers is caused by some type of lock stepping? No clue about it. Thank you.