From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Arcangeli Subject: Re: swapping with MMU Notifiers V2 Date: Thu, 31 Jan 2008 11:15:19 +0100 Message-ID: <20080131101519.GG7185@v2.random> References: <20080129145021.GJ7233@v2.random> <20080130185735.GS7233@v2.random> <47A16F99.8060502@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <47A16F99.8060502-atKUWr5tajBWk0Htik3J/w@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 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(). ------------------------------------------------------------------------- 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/