From: Like Xu <like.xu@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@linux.intel.com>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 2/2] perf/x86/lbr: Move cpuc->lbr_xsave allocation out of sleeping region
Date: Wed, 21 Apr 2021 16:48:36 +0800 [thread overview]
Message-ID: <13fd7ac4-46fd-3fa7-0e80-3f46cfc8edac@linux.intel.com> (raw)
In-Reply-To: <YH/kikWFlfD260qy@hirez.programming.kicks-ass.net>
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 ?
>
next prev parent reply other threads:[~2021-04-21 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 2:18 [PATCH RESEND 1/2] perf/x86: Skip checking MSR for MSR 0x0 Like Xu
2021-04-21 2:18 ` [PATCH RESEND 2/2] perf/x86/lbr: Move cpuc->lbr_xsave allocation out of sleeping region Like Xu
2021-04-21 8:38 ` Peter Zijlstra
2021-04-21 8:48 ` Like Xu [this message]
2021-04-21 9:21 ` Peter Zijlstra
2021-04-21 15:30 ` [PATCH RESEND 1/2] perf/x86: Skip checking MSR for MSR 0x0 Sean Christopherson
2021-04-22 1:18 ` Like Xu
2021-04-22 1:38 ` Sean Christopherson
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=13fd7ac4-46fd-3fa7-0e80-3f46cfc8edac@linux.intel.com \
--to=like.xu@linux.intel.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@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;
as well as URLs for NNTP newsgroup(s).