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

Re: [Xen-devel] pagetable pinning question



> > Actually, it now occurs to me that this strategy has a nasty flaw (at
> > least it does in the v1.3 page-management code). We can end up with
> > circular references: e.g. PD A maps PD B, and vice versa. Unless code
> > is added to detect such loops this will mess up page-frame
> > reclamation since they hold each other as type 'L2'. :-(
> >
> > Hmmmm... I think a simple hack that allows these circular references
> > is sufficient in 1.2 --- we don't properly do reference-count-based
> > reclamation in Xen 1.2. Xen 1.3 is going to need some more thought --
> > wet towel time :-)
> 
> I can't comment on the 1.3 problem but for 1.2 it would seem to me that
> simply increasing the L2's reference count when we map a different L2 table
> as a twisted L2 table would keep things sane even in the circular case, as
> long as we unmap in the opposite order.  Or am I missing something?
> 
> I think I can guarantee that the unmap order is correct if I clear the
> alternate mapping whenever I switch pagetables (and there's no switches
> between a requested mapping and the corresponding unmap).  The pool cache
> destructor would then also only need to check the current pagetable's
> alternate mapping.

Okay, I've checked in a fix for 1.2 that bumps the reference ocutn
when mapping other PDs, and has an appropriate destructor/cleanup
function. 

I'm still thinking about the tidiest way to change 1.3 to get the same
behaviour. 

 -- Keir


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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