Re: [PATCH v3 12/20] xen/balloon: Don't rely on the page granularity is the same for Xen and Linux
From: Julien Grall
Date: Mon Aug 10 2015 - 09:37:15 EST
On 10/08/15 13:55, Stefano Stabellini wrote:
>> If your only concern is the size of the array, we could decrease the
>> number of frames by batch. Or allocation the variable once a boot time.
>
> Yes, that is my only concern. Allocating only nr_pages new struct page*
> would be good enough I guess.
That would be even worst. We shouldn't allocate the array at every call,
but at boot time.
Note that frame_list is already a static variable use 64KB when 64KB
page is used. I guess this will be unlikely to remove that much frame in
a single batch. But I will keep this optimization for later.
Anyway, I'm wondering if we could re-use the lru field to link the page
when allocate them and retrieve in the second loop in order to avoid the
pages array.
Regards,
--
Julien Grall
--
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/