From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH] [PVOPS] fix gntdev on PAE Date: Tue, 01 Jun 2010 09:46:45 -0700 Message-ID: <4C053975.9080906@goop.org> References: <4B71DA53.1080404@goop.org> <4BFFFD7C.5080708@goop.org> <4C0535E8.3030201@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Gerd Hoffmann List-Id: xen-devel@lists.xenproject.org On 06/01/2010 09:36 AM, Stefano Stabellini wrote: >>> Performances shouldn't matter in this case. >>> Something like this: >>> >>> >> The problem is that the rcu lock disables preemption, so anything inside >> it must be non-scheduling. So it would need to be a spinlock type >> thing, I think. >> > right, in fact rwlock is a rw spinlock if I am not mistaken > Ah, yes. The problem with just making it a spinlock is that other parts of the code do copy_from_user while holding it, so they would need to be restructured to avoid that. Also, rwlock is (almost?) never useful compared to a plain spinlock. J