lkml.org 
[lkml]   [2021]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RESEND 2/2] perf/x86/lbr: Move cpuc->lbr_xsave allocation out of sleeping region
From
Date
Hi Peter,

On 2021/4/21 16:38, Peter Zijlstra wrote:
> On Wed, Apr 21, 2021 at 10:18:25AM +0800, Like Xu wrote:
>> -int x86_reserve_hardware(void)
>> +int x86_reserve_hardware(struct perf_event *event)
>> {
>> int err = 0;
>>
>> @@ -398,8 +398,10 @@ int x86_reserve_hardware(void)
>> if (atomic_read(&pmc_refcount) == 0) {
>> if (!reserve_pmc_hardware())
>> err = -EBUSY;
>> - else
>> + else {
>> reserve_ds_buffers();
>> + reserve_lbr_buffers(event);
>> + }
>> }
>> if (!err)
>> atomic_inc(&pmc_refcount);
>> @@ -650,7 +652,7 @@ static int __x86_pmu_event_init(struct perf_event *event)
>> if (!x86_pmu_initialized())
>> return -ENODEV;
>>
>> - err = x86_reserve_hardware();
>> + err = x86_reserve_hardware(event);
>> if (err)
>> return err;
>>
>
> This is still complete garbage..

Hhh,thanks for your comment!

So do we have a better idea to alloc cpuc->lbr_xsave
to avoid this kind of call trace ?

>

\
 
 \ /
  Last update: 2021-04-21 10:49    [W:0.076 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site