Re: [Xen-devel] [PATCH 4/7] xen/mmu: Recycle the Xen provided L4,L3, and L2 pages

From: Konrad Rzeszutek Wilk
Date: Tue Jul 31 2012 - 10:49:03 EST


> > > + for (i = 0; i < ARRAY_SIZE(addr); i++) {
> > > + unsigned j;
> > > + /* No idea about the order the addr are in, so just do them twice. */
> > > + for (j = 0; j < ARRAY_SIZE(addr); j++) {
> >
> > I don't think I understand this double loop.
>
> So with Xen toolstack, the order is L4, L3, L2, L1s.. and with
> the hypervisor it is L4, L1,... but in the future the order might
> be L1, L1 ..., L1, L2, L3, L4 (potentially?) so this double loop
> will loop around the addresses twice to catch this in case we get
> it like this.

Which we would get in case the toolstack ever decided to put those
pages in L4, L2, L3 order. Since the toolstack puts them in L4, L3, L2
and hypervisor puts it in L4, L1, L3, L2 we might as well just
simplify this and not do the extra loop. Posting patches shortly with
this.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/