[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] add locking around certain calls to map_pages_to_xen()


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Keir Fraser <keir.xen@xxxxxxxxx>
  • Date: Fri, 12 Jul 2013 15:01:45 +0100
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 12 Jul 2013 14:02:01 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac5/CFfPEoZFf8Tp2kuiEHczxas9Mg==
  • Thread-topic: [PATCH v2] add locking around certain calls to map_pages_to_xen()

On 12/07/2013 14:41, "Jan Beulich" <JBeulich@xxxxxxxx> wrote:

>> Is it unsafe to just stick a lock around the guts of map_pages_to_xen(), or
>> at least the parts that add new page tables?
> 
> I'm not certain about the safety of this, but clearly two CPUs
> changing entirely different parts of the address space don't need
> to lock out one another, so I rather view adding a global lock here
> as being (potentially) harmful in terms of performance (and hence
> the thought of locking at page table entry granularity instead).

Ah, I see. Well, locking only on changes to page-directory entries wouldn't
be too bad, even if it were a single global lock? That would be a rare
occurrence. It's reasonable to assume that callers will not conflict on the
page-aligned regions they modify, so this would suffice?

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.