From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request Date: Tue, 21 Jul 2009 10:24:08 +0200 Message-ID: <4A657B28.5030006@siemens.com> References: <4A643924.6060908@siemens.com> <20090721000054.GB15189@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from gecko.sbs.de ([194.138.37.40]:17267 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807AbZGUIYZ (ORCPT ); Tue, 21 Jul 2009 04:24:25 -0400 In-Reply-To: <20090721000054.GB15189@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: 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). -rt stumbles over both patterns (that's why I stumbled over it in the first place: get_cpu disables preemption, but spin_lock is a sleeping lock under -rt) and actually requires requests_lock to become raw_spinlock_t. Reordering get_cpu and spin_lock would be another option, but not really a gain for both scenarios. So unless there is a way to make the whole critical section preemptible (thus migration-agnostic), I think we can micro-optimize it like this. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux