From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753740AbbCYTzs (ORCPT ); Wed, 25 Mar 2015 15:55:48 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:32977 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbbCYTzq (ORCPT ); Wed, 25 Mar 2015 15:55:46 -0400 Message-ID: <551312C0.4060706@gmail.com> Date: Wed, 25 Mar 2015 13:55:44 -0600 From: David Ahern User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Don Zickus CC: acme@kernel.org, linux-kernel@vger.kernel.org, Joe Mario , Jiri Olsa Subject: Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events References: <1427302270-10178-1-git-send-email-dsahern@gmail.com> <20150325191526.GX162412@redhat.com> In-Reply-To: <20150325191526.GX162412@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/25/15 1:15 PM, Don Zickus wrote: > On Wed, Mar 25, 2015 at 10:51:10AM -0600, David Ahern wrote: >> 363b785f38 added synthesized fork events and set a thread's parent id >> to itself. Since we are already processing /proc//status the ppid >> can be determined properly. Make it so. >> >> Performance impact measured on a sparc based T5-8 (1024 CPUs): >> $ ps -efL | wc -l >> 20185 >> >> Current code: >> $ time perf record -o perf-no-ppid.data -e cpu-clock -F 1000 -a -v -BN -- usleep 1 >> mmap size 532480B >> [ perf record: Woken up 0 times to write data ] >> failed to write feature 9 >> [ perf record: Captured and wrote 0.000 MB perf-no-ppid.data ] >> >> real 0m26.144s >> user 0m0.452s >> sys 0m25.564s >> >> With PPID patch: >> $ time ./perf_ppid record -o perf-ppid.data -e cpu-clock -F 1000 -a -v -BN -- usleep 1 >> mmap size 532480B >> [ perf record: Woken up 0 times to write data ] >> failed to write feature 9 >> [ perf record: Captured and wrote 0.000 MB perf-ppid.data ] >> >> real 0m25.743s >> user 0m0.268s >> sys 0m25.368s >> >> Signed-off-by: David Ahern >> Cc: Don Zickus >> Cc: Joe Mario >> Cc: Jiri Olsa >> --- >> v2: >> - removed loop in place of 1 read and processing a buffer > > Hmm, I am not entirely sure this is correct. You made an optimization that > hides the negative impact your patch does. I would prefer you split this > patch into two pieces. One with the read loop optimization (which I think > is great) and the second is your ppid change. > > I would then like to redo our test with the first patch applied and then > both patches applied. > From your other response I take it you understand the patch now? It is a matter of semantics to break this single into 2 -- optimize the existing code and then add the ppid. End result will be what this patch shows. Before I do that can you /Joe confirm the performance is acceptable? Thanks,