lkml.org 
[lkml]   [2010]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC 3/4] Paravirtualized spinlock implementation for KVM guests
      On 08/02/2010 01:48 AM, Avi Kivity wrote:
    > On 07/26/2010 09:15 AM, Srivatsa Vaddagiri wrote:
    >> Paravirtual spinlock implementation for KVM guests, based heavily on
    >> Xen guest's
    >> spinlock implementation.
    >>
    >>
    >> +
    >> +static struct spinlock_stats
    >> +{
    >> + u64 taken;
    >> + u32 taken_slow;
    >> +
    >> + u64 released;
    >> +
    >> +#define HISTO_BUCKETS 30
    >> + u32 histo_spin_total[HISTO_BUCKETS+1];
    >> + u32 histo_spin_spinning[HISTO_BUCKETS+1];
    >> + u32 histo_spin_blocked[HISTO_BUCKETS+1];
    >> +
    >> + u64 time_total;
    >> + u64 time_spinning;
    >> + u64 time_blocked;
    >> +} spinlock_stats;
    >
    > Could these be replaced by tracepoints when starting to spin/stopping
    > spinning etc? Then userspace can reconstruct the histogram as well as
    > see which locks are involved and what call paths.

    Unfortunately not; the tracing code uses spinlocks.

    (TBH I haven't actually tried, but I did give the code an eyeball to
    this end.)

    J



    \
     
     \ /
      Last update: 2010-08-02 17:23    [W:0.020 / U:121.952 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site