From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: swapping with MMU Notifiers V2 Date: Thu, 31 Jan 2008 12:34:37 +0200 Message-ID: <47A1A43D.6020203@qumranet.com> References: <20080129145021.GJ7233@v2.random> <20080130185735.GS7233@v2.random> <47A16F99.8060502@qumranet.com> <20080131101519.GG7185@v2.random> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Andrea Arcangeli Return-path: In-Reply-To: <20080131101519.GG7185-lysg2Xt5kKMAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Andrea Arcangeli wrote: > On Thu, Jan 31, 2008 at 08:50:01AM +0200, Avi Kivity wrote: > >> This is surprising. pagefault_disable() is really a preempt_disable(), and >> kvm_read_guest_atomic() should only be called from atomic contexts (with >> preemption already disabled), no? >> > > _spin_lock calls preempt_disable() and that's the result with PREEMPT=n: > > #define preempt_disable() do { } while (0) > > pagefault_disable always calls into inc_preempt_count() which is why > kmap_atomic uses it instead of preempt_disable(). > I see. Will merge that patch, thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/