lkml.org 
[lkml]   [2010]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] x86,perf: Implement minimal P4 PMU driver v14
On Thu, Mar 11, 2010 at 10:24:22PM +0100, Peter Zijlstra wrote:
> On Fri, 2010-03-12 at 00:15 +0300, Cyrill Gorcunov wrote:
>
> > Perhaps something like the patch below (tested with kvm)? With this patch
> > we will actually waste ~4/8 bytes per PMU (intel,amd,p6) since this call
> > hits on p4 only, so I think perhaps better to use one x86 scheduler hook
> > instead of empty schedule_events() in PMU, hmm?
> > ---
> >
> > x86,perf: Fix NULL deref on not assigned x86_pmu
> >
> > In case of not assigned x86_pmu and software events
> > NULL dereference may being hit via x86_pmu::schedule_events
> > method.
> >
> > Fix it by calling x86_pmu::schedule_events only if we
> > have one. Otherwise use general scheduler.
> >
> > Also the former x86_schedule_events calls restored.
>
> Hrm,.. not sure that makes sense, sure it might not crash anymore, but
> its not making much sense to compute anything if we don't have an
> initialized x86_pmu.
>
> Doesn't adding something like:
>
> if (!x86_pmu_initialized())
> return;
>
> to hw_perf_group_sched_in() make more sense? We seem to do that for all
> these weak things except this one.
>

As far as I see it'll not update tstamp_running then (in x86_event_sched_in).
Or I miss somethig?

-- Cyrill


\
 
 \ /
  Last update: 2010-03-11 22:33    [W:0.045 / U:5.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site