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: Wed, 22 Jul 2009 01:29:24 +0200 Message-ID: <4A664F54.3080507@web.de> References: <4A643924.6060908@siemens.com> <20090721000054.GB15189@amt.cnet> <4A657B28.5030006@siemens.com> <20090721171025.GA6959@amt.cnet> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF9C741618F16B7487E67D8E7" Cc: kvm-devel To: Marcelo Tosatti Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:39129 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754377AbZGUXcI (ORCPT ); Tue, 21 Jul 2009 19:32:08 -0400 In-Reply-To: <20090721171025.GA6959@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF9C741618F16B7487E67D8E7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Marcelo Tosatti wrote: > On Tue, Jul 21, 2009 at 10:24:08AM +0200, Jan Kiszka wrote: >> 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. >=20 > I see. >=20 >> So unless there is a way to make the whole critical section preemptibl= e >> (thus migration-agnostic), I think we can micro-optimize it like this.= >=20 > Can't you switch requests_lock to be raw_spinlock_t then? (or whatever > is necessary to make it -rt compatible). >=20 raw_spinlock_t over -rt is not comparable to raw_spinlock_t over mainline. So I'm currently carrying a local patch with #ifdef CONFIG_PREEMPT_RT raw_spinlock_t some_lock; #else spinlock_t some_lock; #endif for all locks that need it (there are three ATM). That said, I'm suspecting there are more problems with kvm over -rt right now. I'm seeing significant latency peeks on the host. Still investigating, though. However I don't think we should bother too much about -rt compliance in mainline unless the diff is trivial and basically irrelevant for the common non-rt cases. Jan --------------enigF9C741618F16B7487E67D8E7 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpmT1kACgkQniDOoMHTA+m2VQCeKw1wIH88qLGY6RQ90jQIqD0A KzUAnjY7bc/NKDAHouRcjnd/5Kq2ChtW =AbiK -----END PGP SIGNATURE----- --------------enigF9C741618F16B7487E67D8E7--