From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request Date: Mon, 03 Aug 2009 15:18:38 +0300 Message-ID: <4A76D59E.4020102@redhat.com> References: <4A643924.6060908@siemens.com> <20090721000054.GB15189@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm-devel To: Marcelo Tosatti Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54264 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754742AbZHCMN0 (ORCPT ); Mon, 3 Aug 2009 08:13:26 -0400 In-Reply-To: <20090721000054.GB15189@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 07/21/2009 03:00 AM, Marcelo Tosatti wrote: > Jan, > > This was suggested but we thought it might be safer to keep the > get_cpu/put_cpu pair in case -rt kernels require it (which might be > bullshit, but nobody verified). > > Thinking about it, it is bullshit: >> >> - me = get_cpu(); >> spin_lock(&kvm->requests_lock); >> + me = smp_processor_id(); >> The -rt kernel cannot substitute a mutex for the spinlock here, since we are pinned to a single cpu. It will have to use a raw spinlock here. However, the 'me' variable is completely spurious. It only affects the statistics gathering, I think we can safely drop it. -- error compiling committee.c: too many arguments to function