mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Don Zickus <dzickus@redhat.com>
Cc: acme@kernel.org, linux-kernel@vger.kernel.org,
	Joe Mario <jmario@redhat.com>, Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH v2] perf tool: Fix ppid for synthesized fork events
Date: Wed, 25 Mar 2015 13:55:44 -0600	[thread overview]
Message-ID: <551312C0.4060706@gmail.com> (raw)
In-Reply-To: <20150325191526.GX162412@redhat.com>

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/<pid>/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 <dsahern@gmail.com>
>> Cc: Don Zickus <dzickus@redhat.com>
>> Cc: Joe Mario <jmario@redhat.com>
>> Cc: Jiri Olsa <jolsa@redhat.com>
>> ---
>> 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,


  reply	other threads:[~2015-03-25 19:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 16:51 David Ahern
2015-03-25 19:15 ` Don Zickus
2015-03-25 19:55   ` David Ahern [this message]
2015-03-25 20:26     ` Don Zickus
2015-03-26 21:11     ` Don Zickus
2015-03-26 21:37       ` David Ahern
2015-03-27 13:10         ` Don Zickus
2015-03-27 14:03           ` David Ahern
2015-03-27 14:20             ` Arnaldo Carvalho de Melo
2015-03-27 19:49               ` Don Zickus
2015-03-27 20:09                 ` Arnaldo Carvalho de Melo
2015-03-27 20:10                 ` David Ahern
2015-03-27 20:25                   ` Don Zickus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=551312C0.4060706@gmail.com \
    --to=dsahern@gmail.com \
    --cc=acme@kernel.org \
    --cc=dzickus@redhat.com \
    --cc=jmario@redhat.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome