From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755841AbbCYPDn (ORCPT ); Wed, 25 Mar 2015 11:03:43 -0400 Received: from mail-ig0-f175.google.com ([209.85.213.175]:33541 "EHLO mail-ig0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754182AbbCYPDk (ORCPT ); Wed, 25 Mar 2015 11:03:40 -0400 Message-ID: <5512CE4A.2060800@gmail.com> Date: Wed, 25 Mar 2015 09:03:38 -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: Arnaldo Carvalho de Melo , Joe Mario CC: Don Zickus , linux-kernel@vger.kernel.org, Jiri Olsa Subject: Re: [PATCH] perf tool: Fix ppid for synthesized fork events 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> In-Reply-To: <20150325132405.GB13759@kernel.org> 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 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 > 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