From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 2/2] KVM: Convert read-only users of vm_list to RCU Date: Thu, 10 Feb 2011 14:14:40 +0100 Message-ID: <4D53E4C0.5000605@siemens.com> References: <4D512EF7.8040409@siemens.com> <4D512F3B.1080107@siemens.com> <4D53BB02.20206@redhat.com> <4D53CCAB.8040204@siemens.com> <4D53DB54.90605@redhat.com> <4D53DDD3.5020704@siemens.com> <4D53E063.1040004@redhat.com> <4D53E0A9.2030501@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , Zachary Amsden To: Avi Kivity Return-path: Received: from david.siemens.de ([192.35.17.14]:27693 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754290Ab1BJNO5 (ORCPT ); Thu, 10 Feb 2011 08:14:57 -0500 In-Reply-To: <4D53E0A9.2030501@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-02-10 13:57, Avi Kivity wrote: > On 02/10/2011 02:56 PM, Avi Kivity wrote: >>> What's the benefit? The downside is a bit more complexity as you need an >>> additional callback handler. >> >> >> synchronize_rcu() can be very slow (its a systemwide operation), and >> mmu_shrink() can be called often on a loaded system. >> > > In fact this just shows that vm_list is not a good candidate for rcu; > rcu is useful where most operations are reads, but if we discount stats, > most operations on vm_list are going to be writes. Accept for mmu_shrink, which is write but not delete, thus works without that slow synchronize_rcu. And I don't see the need for call_rcu in the vm deletion path. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux