lkml.org 
[lkml]   [2013]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/14] perf ftrace: Add 'record' sub-command
On 5/5/13 7:57 PM, Namhyung Kim wrote:
> Hi David,
>
> On Fri, 26 Apr 2013 07:44:18 -0600, David Ahern wrote:
>> On 4/25/13 12:24 AM, Namhyung Kim wrote:
>>> But it looks there's a race between cond_wait() and cond_broatcast().
>>> I'll take a look at that.
>>
>> Why not use eventfd or a pipe for the signalling instead?
>
> Thanks for your feedback!
>
> I didn't have an idea of using eventfd for this case. Does it helpful
> to prevent such a deadlock like this?

I have used it to replace pthread_cond_wait /
pthread_cond_{signal,broadcast} -- lighter and faster. It was added in
2.6.27 I believe, so will be available for any system that supports perf
(record side). For people compiling perf against say RHEL5 (e.g.
analysis) you will need a check as to whether it exists.

David



\
 
 \ /
  Last update: 2013-05-06 05:41    [W:7.004 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site