From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441AbbCYU0c (ORCPT ); Wed, 25 Mar 2015 16:26:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60954 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753402AbbCYU03 (ORCPT ); Wed, 25 Mar 2015 16:26:29 -0400 Date: Wed, 25 Mar 2015 16:26:25 -0400 From: Don Zickus To: David Ahern 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 Message-ID: <20150325202625.GC162412@redhat.com> References: <1427302270-10178-1-git-send-email-dsahern@gmail.com> <20150325191526.GX162412@redhat.com> <551312C0.4060706@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551312C0.4060706@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2015 at 01:55:44PM -0600, David Ahern wrote: > 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? Yes. I believe Joe will try to find time on Thursday to run this. Cheers, Don