From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: get rid of srcu idx Date: Tue, 26 Oct 2010 09:57:08 +0200 Message-ID: <4CC689D4.9010401@redhat.com> References: <20101024171610.GA24375@redhat.com> <20101025135229.GA3392@amt.cnet> <20101025132058.GA18082@redhat.com> <20101025201356.GA18436@amt.cnet> <20101026065820.GJ2343@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:39569 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752949Ab0JZH5L (ORCPT ); Tue, 26 Oct 2010 03:57:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9Q7vBVk018721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 26 Oct 2010 03:57:11 -0400 In-Reply-To: <20101026065820.GJ2343@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/26/2010 08:58 AM, Gleb Natapov wrote: > > > > Well, you just changed where srcu index is saved. I don't see how it > > could make a difference in practice. > > > If there is nested call to srcu read lock if srcu_idx is stored in vcpu > nested call will override previous srcu_idx value and srcu unlock will > not be called on it, but it will be called twice on new srcu_idx value. > If srcu_idx is saved on stack this will not happen, no? Exactly. The case where srcu_idx is passed as a pointer parameter is still dubious, but we can change that too. -- error compiling committee.c: too many arguments to function