From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/2] KVM: Convert kvm_lock to raw_spinlock Date: Wed, 09 Feb 2011 15:20:42 +0200 Message-ID: <4D5294AA.2060503@redhat.com> References: <4D512F35.1050108@siemens.com> <4D525D30.2000402@redhat.com> <4D525D7D.8080306@redhat.com> <4D528905.8030802@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Zachary Amsden To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:8522 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754718Ab1BINUs (ORCPT ); Wed, 9 Feb 2011 08:20:48 -0500 In-Reply-To: <4D528905.8030802@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 02/09/2011 02:31 PM, Jan Kiszka wrote: > On 2011-02-09 10:25, Avi Kivity wrote: > > On 02/09/2011 11:24 AM, Avi Kivity wrote: > >> On 02/08/2011 01:55 PM, Jan Kiszka wrote: > >>> Code under this lock requires non-preemptibility. Ensure this also over > >>> -rt by converting it to raw spinlock. > >>> > >> > >> Please add a code comment documenting what data under this lock > >> requires it to be a raw spinlock. > >> > > > > Or better, put it in Documentation/kvm/locking.txt, which we'll try to > > grow to cover all locks. > > > > Something like > > [Documentation/kvm/locking.txt] > KVM Lock Overview > ----------------- > > 1. Spin locks > > 1.1 tsc_write_lock > > Type: raw > Arch: x86 > Protects: kvm_arch::{last_tsc_write,last_tsc_nsec,last_tsc_offset} > tsc offset in vmcb > Comment: 'raw' because updating the tsc offsets must not be preempted > ... > > ? Yes. I wouldn't sort them by type though, that changes from time to time. -- error compiling committee.c: too many arguments to function