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

Re: [Xen-devel] [PATCH v2 3/8] tools: arm: allocate large pages to guests.





On 12/06/14 08:19, Ian Campbell wrote:
On Wed, 2014-06-11 at 22:26 +0100, Julien Grall wrote:
Hi Ian,

On 11/06/14 17:39, Ian Campbell wrote:
Previously we would allocate in batches of up to 4GB worth of pages (allocsz
clamped at 1024*1024 pages) however this would now require 8MB worth of start
for the extents array in populate_one_size. Reduce to just 256*1024 or 1GB
worth of pages (at level 3) or 2MB of stack.

I think you can drop this paragraph. You are using calloc rather than
the stack in your patch.

Oops, yes. I'll do that on commit unless I have another reason to
resend.

-    return rc;
+    for ( pfn = 0; pfn < nr_pfns; pfn++ )
+        dom->p2m_host[pfn] = base_pfn + pfn;
+
+out:
+    free(extents);

Does free preserve errno? I can't find anything saying it... If so we
may lose it when there is not enought memory.

I'm not 100% sure but I'm almost certain it is fine. free() returns void
and http://pubs.opengroup.org/onlinepubs/007908799/xsh/free.html says no
error codes are defined for it.

Thanks for the answer. Assuming that:

Acked-by: Julien Grall <julien.grall@xxxxxxxxxx>

Regards,

--
Julien Grall

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