From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Paul E. McKenney" Subject: Re: qemu-kvm.git build problem Date: Mon, 11 Jan 2010 16:51:18 -0800 Message-ID: <20100112005118.GO6632@linux.vnet.ibm.com> References: <1262025646.2774.16.camel@localhost.localdomain> <1263014581.2439.207.camel@localhost.localdomain> <4B4AF9D2.3080100@siemens.com> <4B4AFAD9.3010604@redhat.com> <4B4AFBC7.1020801@siemens.com> <4B4BC0F3.2010507@web.de> Reply-To: paulmck@linux.vnet.ibm.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Lucas Meneghel Rodrigues , KVM mailing list , Michael Goldish , Eduardo Habkost , Dor Laor To: Jan Kiszka Return-path: Received: from e4.ny.us.ibm.com ([32.97.182.144]:46732 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612Ab0ALAvS (ORCPT ); Mon, 11 Jan 2010 19:51:18 -0500 Received: from d01relay03.pok.ibm.com (d01relay03.pok.ibm.com [9.56.227.235]) by e4.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0C0fdKc028548 for ; Mon, 11 Jan 2010 19:41:39 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay03.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0C0pHvS151370 for ; Mon, 11 Jan 2010 19:51:17 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0C0pHQw003276 for ; Mon, 11 Jan 2010 19:51:17 -0500 Content-Disposition: inline In-Reply-To: <4B4BC0F3.2010507@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Jan 12, 2010 at 01:23:15AM +0100, Jan Kiszka wrote: > Jan Kiszka wrote: > > Avi Kivity wrote: > >> On 01/11/2010 12:13 PM, Jan Kiszka wrote: > >>> BTW, does anybody know how to back-port synchronize_srcu_expedited best? > >>> It looked like a simple mapping to synchronize_srcu was not sufficient > >>> to achieve the same performance as with the pre-srcu locking (e.g. > >>> guest&host stalled during guest's framebuffer setup). > >>> > >> Isn't it sufficient to backport kernel/srcu.c? I thought no sched.c > >> changes were necessary. > > > > Haven't looked yet, but if that's the case, it would indeed be > > straightforward. > > It's far away from being straightforward: synchronize_rcu_expedited is > based on synchronize_sched_expedited, introduced to 2.6.32. But that > services is hooked deep into the scheduler, fiddling directly with > runqueues (which are completely private to sched.c). This path looks > like a dead end, specifically when its about supporting ~8 major Linux > releases backwards. > > Paul, we have a problem here on the KVM-for-older-kernels front: We need > synchronize_rcu_expedited for acceptable write-side performance (there > are certain phases with lots of changes, plain synchronize_rcu just > stalls both guest and host for several seconds). Our target kernels > (down to 2.6.27, unofficially even 2.6.24) do not have the expedited > service. Can you think of a poor man's solution for those kernels? > > Unfortunately, I don't think there is mechanical patching possible to > role-back our srcu use to a rw-sem. But I will check this once again > tomorrow. Would it help if I backported the RCU expedited stuff? Yes, it does involve kernel/sched.c, but it is reasonably hands-off. If this would help, please let me know to which kernel version you need the backport. FYI -- will be AFK Friday and most of the weekend, flying over the Pacific. Thanx, Paul