From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753249AbbCYTUQ (ORCPT ); Wed, 25 Mar 2015 15:20:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49767 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753208AbbCYTUM (ORCPT ); Wed, 25 Mar 2015 15:20:12 -0400 Date: Wed, 25 Mar 2015 15:20:09 -0400 From: Don Zickus To: David Ahern Cc: Arnaldo Carvalho de Melo , Joe Mario , linux-kernel@vger.kernel.org, Jiri Olsa Subject: Re: [PATCH] perf tool: Fix ppid for synthesized fork events Message-ID: <20150325192009.GZ162412@redhat.com> References: <1426786875-18025-1-git-send-email-dsahern@gmail.com> <20150319205648.GC199787@redhat.com> <550B3A66.2030902@gmail.com> <20150324201020.GH199787@redhat.com> <5511D349.7070508@gmail.com> <5512A88A.1010608@redhat.com> <20150325132405.GB13759@kernel.org> <5512CE4A.2060800@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5512CE4A.2060800@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 09:03:38AM -0600, David Ahern wrote: > On 3/25/15 7:24 AM, Arnaldo Carvalho de Melo wrote: > >So it starts when there are tons of threads in the system, for which > >synthezing from /proc will have to take place, without looking again at > >that patch, I can't think about what would be a problem :-\ > > 3 extra lines are read from /proc/pid/status: > > Name: bash > State: S (sleeping) > Tgid: 6046 > > < current patch breaks here> > > Ngid: 0 > Pid: 6046 > PPid: 6045 > > < my patch reads these 3 lines, repeats the memcmp and does an atoi > on the PPid: value > Ah, I read my email out of order. So you figured out the extra latency. Nice. In that case I think I am ok with your V2, though I still think split it out would make sense. Sorry about that. Thanks for quickly debugging that!! Cheers, Don > > Let me remove that loop by reading in 4k at a time and making a > single pass. That should bring down the overhead, but filling in the > ppid will add some. > > David >