From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH RFC 1/2] kvm: Handle undercommitted guest case in PLE handler Date: Sun, 07 Oct 2012 11:51:35 +0200 Message-ID: <507150A7.9010001@redhat.com> References: <5061713D.5060406@redhat.com> <50641356.5070008@redhat.com> <506540C7.9070105@linux.vnet.ibm.com> <50680049.5020206@redhat.com> <20120930110755.GB1009@redhat.com> <50682945.3060309@redhat.com> <20121003141739.GA15253@linux.vnet.ibm.com> <506C5239.4080209@redhat.com> <20121004072900.GU23096@redhat.com> <506E9C01.5040300@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Jiannan Ouyang , Peter Zijlstra , Rik van Riel , "H. Peter Anvin" , Ingo Molnar , Marcelo Tosatti , Srikar , "Nikunj A. Dadhania" , KVM , chegu vinod , "Andrew M. Theurer" , LKML , Srivatsa Vaddagiri To: Raghavendra K T Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28246 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743Ab2JGJv6 (ORCPT ); Sun, 7 Oct 2012 05:51:58 -0400 In-Reply-To: <506E9C01.5040300@linux.vnet.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 10/05/2012 10:36 AM, Raghavendra K T wrote: >>> >>> You can store i in the vcpu itself: >>> >>> set_bit(vcpu->index, &kvm->preempted); >>> >> This will make the fact that vcpus are stored in an array into API >> instead of implementation detail :( There were patches for vcpu >> destruction that changed the array to rculist. Well, it will be still >> possible to make the array rcu protected and copy it every time vcpu is >> deleted/added I guess. >> > > If IUC, summary is, we are going with > - Let vcpu array be rcu protected. That's for the future. For now ->vcpus[] is statically allocated. > - we use index inside vcpu and should be updated when a vcpu is > added/deleted. Yes. -- error compiling committee.c: too many arguments to function