Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965035AbXHYL6O (ORCPT ); Sat, 25 Aug 2007 07:58:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752340AbXHYL56 (ORCPT ); Sat, 25 Aug 2007 07:57:58 -0400 Received: from ozlabs.org ([203.10.76.45]:47279 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbXHYL55 (ORCPT ); Sat, 25 Aug 2007 07:57:57 -0400 Subject: Re: [PATCH] Fix preemptible lazy mode bug From: Rusty Russell To: Zachary Amsden Cc: Jeremy Fitzhardinge , Linus Torvalds , Linux Kernel Mailing List , Andrew Morton , Chris Wright , stable@kernel.org, Virtualization Mailing List , Andi Kleen In-Reply-To: <46CE81DC.90103@vmware.com> References: <46CE70C8.2030005@vmware.com> <46CE8069.9070404@goop.org> <46CE81DC.90103@vmware.com> Content-Type: text/plain Date: Sat, 25 Aug 2007 21:57:10 +1000 Message-Id: <1188043030.20041.75.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 28 On Thu, 2007-08-23 at 23:59 -0700, Zachary Amsden wrote: > Jeremy Fitzhardinge wrote: > > Hm. Doing any kind of lazy-state operation with preemption enabled is > > fundamentally meaningless. How does it get into a preemptable state > > > > Agree 100%. It is the lazy mode flush that might happen when preempt is > enabled, but lazy mode is disabled. In that case, the code relies on > per-cpu variables, which is a bad thing to do in preemtible code. This > can happen in the current code path. Frankly, we should hoist the per-cpu state into generic paravirt code, get rid of the FLUSH "state" and only call the lazy_mode hooks when actually entering or exiting a lazy mode. The only reason lguest doesn't use a per-cpu var is that guests are currently UP only. If that were fixed, we'd have identical VMI, Xen and lguest lazy state handing. Cheers, Rusty. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/