From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM call minutes for Sept 21 Date: Mon, 27 Sep 2010 16:22:33 +0200 Message-ID: <4CA0A8A9.2090008@redhat.com> References: <20100921180506.GI28009@x200.localdomain> <20100922000438.GA2844@fermat.math.technion.ac.il> <20100922090248.GD11145@redhat.com> <20100922162900.GA12492@fermat.math.technion.ac.il> <20100922174706.GA18005@redhat.com> <20100922192038.GK15338@8bytes.org> <4C9F52A1.1060306@redhat.com> <20100926202554.GN15338@8bytes.org> <4CA057A9.7030800@redhat.com> <20100927141859.GG11145@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Joerg Roedel , "Nadav Har'El" , Chris Wright , kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:23971 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759361Ab0I0OWm (ORCPT ); Mon, 27 Sep 2010 10:22:42 -0400 In-Reply-To: <20100927141859.GG11145@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/27/2010 04:18 PM, Gleb Natapov wrote: > On Mon, Sep 27, 2010 at 10:36:57AM +0200, Avi Kivity wrote: > > On 09/26/2010 10:25 PM, Joerg Roedel wrote: > > >> btw, speaking of drastic changes to nsvm, one thing I'd like to see is > > >> the replacement of those kmaps with something like put_user_try() and > > >> put_user_catch(). It should be as fast (or faster) than kmaps, and not > > >> affect preemptibility. > > > > > >Yes, I want to get rid of them too. I thought about using > > >copy_from/to_user in the vmrun/vmexit path. I need to measure if this > > >has any performance impact, though. > > > > copy_to_user() is slow since it is very generic. put_user() > > generally translates to one instruction (perhaps a range check as > > well). We can avoid the range check if we do it once for the entire > > vmcb page. > > > > Gleb had something along those lines, it's useful for kvmclock as well. > > > Well, since you asked to make it generic it uses copy_to_user() now :) > It tracks slot version so gfn_to_hva() translation is omitted most of > the times. Sure, that's easy to optimize later on. -- error compiling committee.c: too many arguments to function