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

Re: [Xen-devel] [PATCH 5/7] libxc: implement gntshr for minios

On 29.04.2013 00:44, Samuel Thibault wrote:
> Marek Marczykowski, le Tue 23 Apr 2013 05:17:59 +0200, a Ãcrit :
>> +static int minios_gntshr_munmap(xc_gntshr *xcg, xc_osdep_handle h,
>> +                               void *start_address, uint32_t count)
>> +{
>> +    int i;
>> +    uint32_t gref;
>> +
>> +    for (i = 0; i < count; i++) {
>> +        gref = gnttab_find_grant_of_page(start_address + i * PAGE_SIZE);
> This can become quite expensive. Can we really not afford allocating the
> list of grants, keeping its adresse in the xc_osdep_handle?

count is number of pages, so most likely gnttab_find_grant_of_page() will be
called no more than few times. Also most likely munmap will be called very
rarely (connection close).
Anyway I haven't calculated how much memory such mapping will require and how
much memory is still available in stubdom. Do you have some numbers?

What can be xc_osdep_handle? In (almost?) every case it is file descriptor.
Can it be some memory pointer?

Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab

Attachment: signature.asc
Description: OpenPGP digital signature

Xen-devel mailing list



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