WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: hvm vpt lock strangeness

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>, "Xen-Devel (E-mail)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: hvm vpt lock strangeness
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Fri, 23 May 2008 21:38:50 +0100
Cc: Dave Winchell <dwinchell@xxxxxxxxxxxxxxx>
Delivery-date: Fri, 23 May 2008 13:38:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080523142728984.00000001192@djm-pc>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci9E2oGAJzF1EZjSc6j4tV5CX6tWgAAZelL
Thread-topic: hvm vpt lock strangeness
User-agent: Microsoft-Entourage/11.4.0.080122
Locking is required to prevent multiple concurrent access to a single
periodic timer. This is actually implemented at vcpu granularity to avoid
lock juggling in functions which walk lists of timers. Since those lists are
held per-vcpu, the convenient locking scope is the vcpu.

 -- Keir

On 23/5/08 21:27, "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> Noticed this a few days ago while working on the hvm-guest-time
> on xen-system-time patch, but forgot about it...
> 
> Throughout xen/arch/x86/hvm/vpt.c, there are uses of a spinlock
> called tm_lock.  But it appears that this spinlock is declared
> and used as part of a per-vcpu data structure.  So is this
> somehow protecting against vcpu re-entrancy (didn't think that
> could happen) or is it supposed to be locking out one vcpu
> against another (and not doing the job because each vcpu has
> a separate lock)?  Or am I misunderstanding something entirely?
> 
> If this should be a domain-wide lock, I'll spin a patch.
> (And it might explain some of the weirder time problems?)
> 
> Thanks,
> Dan
> 
> ===================================
> Thanks... for the memory
> I really could use more / My throughput's on the floor
> The balloon is flat / My swap disk's fat / I've OOM's in store
> Overcommitted so much
> (with apologies to the late great Bob Hope)



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>