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

Re: [Xen-devel] [PATCH 0 of 6] [RFC] Use wait queues for paging, v2


  • To: "Tim Deegan" <tim@xxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Thu, 15 Mar 2012 08:56:12 -0700
  • Cc: Olaf Hering <olaf@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Thu, 15 Mar 2012 15:56:25 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= lagarcavilla.org; b=HmnDKCh7qGnntlkmotnIRHAE3EKfHRK6hKO3eIAnmjQF /yh5vN6bAwDHp/GM3mXTVw4RsKdGLCe+fs2EWKcGcoTyQVXJv9xmc8VVbH5B3kc9 zJye6e2p8XTPsSOh+7itvF7F9aW7qWE7h4cWrl48EFHjhMaRojvkI+dpAVARJCI=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

> At 16:37 +0100 on 15 Mar (1331829432), Olaf Hering wrote:
>> On Thu, Mar 15, Tim Deegan wrote:
>>
>> > At 20:56 +0100 on 29 Feb (1330548983), Olaf Hering wrote:
>> > > On Wed, Feb 29, Olaf Hering wrote:
>> > >
>> > > > This is the domain_lock() in xenmem_add_to_physmap_once().
>> > > >
>> > > > Is get_gfn_untyped() correct, or would get_gfn_query() work as
>> well in
>> > > > this context?
>> >
>> > get_gfn_untyped() is correct.  I'm not sure that we really need to
>> take
>> > the domain lock while we're doing it, though.  It might be that the
>> new
>> > gfn locks will be enough to serialize these updates.
>> >
>> > > Another case is emulate_privileged_op(), in "Write CR3" case
>> > > get_gfn_untyped() is called with domain_lock().
>> >
>> > I think that should be OK as it only happens for PV guests.
>>
>> I think its just me not knowing these things, but would it make sense to
>> add comments to XX_lock users describing what they protect (or used to
>> protect since comments can stale over time)?
>
> Yes!  I'm trying to get this sorted out for all the MM locks, as well as
> the discipline of which order to take them in.  But the domain lock
> (a.k.a the Big Lock) is an ancient and venerable lock, now poorly
> understood, at least by me. :)  The add_to_physmap path started taking
> this lock in cset 9187:fbeb0a5b7219, in 2006.

We've come a long way in terms of discipline for the mm. But there is
still the odd interaction -- see recent posts about deadlock between p2m
and event channel lock.

And the big domain lock is surely a big rug thrown over a lot of painful
dirt ("metaphors, not Andres's forte")

Even more venerable and hideous is the domctl lock. It's actually somewhat
surprising the switch to memops for paging/sharing worked rather
seamlessly.

Andres
>
> Tim.
>
>



_______________________________________________
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®.