lkml.org 
[lkml]   [2009]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Does CONFIG_PARAVIRT imply usage of byte locks?
On Sun, 11 Jan 2009, Jeremy Fitzhardinge wrote:

> > Looking at the code, I wonder whether are we in fact really using byte
> > locks in CONFIG_PARAVIRT situation? Where are we actually setting
> > pv_lock_ops.spin_lock pointer to point to __byte_spin_lock?
> >
> > Such initialization seems to happen only in paravirt_use_bytelocks()
> > function, but my blind eyes prevent me from finding a callsite from which
> > this function would eventually get called.
> >
> > It seems to me that paravirt_use_bytelocks() is a dead code that gets never
> > called, and the same applies to the implementations of write locks. What did
> > I miss?
>
> Probably nothing. Xen has its own optimised spinlock implementation, and so
> doesn't use the plain byte locks. But ticket locks are awesomely bad for any
> virtual environment which doesn't gang schedule VCPUs, so the kvm folks would
> do well to at least consider using them.

Avi, are there any plans to make KVM use byte locks implementation for
spinlocks in the near future?

If not, we should remove them completely, as it's completely dead code.

Thanks,

--
Jiri Kosina
SUSE Labs


\
 
 \ /
  Last update: 2009-01-11 23:55    [W:0.046 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site