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

Re: [Xen-devel] [PATCHv7 3/3] gnttab: use per-VCPU maptrack free lists



On 12/05/15 12:37, Jan Beulich wrote:
>>>> On 12.05.15 at 13:01, <david.vrabel@xxxxxxxxxx> wrote:
>> On 05/05/15 13:34, Jan Beulich wrote:
>>>>>> On 30.04.15 at 15:28, <david.vrabel@xxxxxxxxxx> wrote:
>>>> @@ -1430,6 +1456,17 @@ gnttab_setup_table(
>>>>      gt = d->grant_table;
>>>>      write_lock(&gt->lock);
>>>>  
>>>> +    /* Tracking of mapped foreign frames table */
>>>> +    if ( (gt->maptrack = xzalloc_array(struct grant_mapping *,
>>>> +                                       max_maptrack_frames * 
>>>> d->max_vcpus)) == NULL )
>>>> +        goto out3;
>>>
>>> This surely can easily become an allocation of far more than a page,
>>> and hence needs to be broken up (perhaps using vmap() to map
>>> individually allocated pages).
>>
>> I think there should be a common vzalloc_array() function.  Do you
>> agree?  This will use xzalloc_array() if the alloc is < PAGE_SIZE to
>> avoid needlessly using vmap space.
> 
> For the _array flavor I'm not sure, but vmalloc()/vzalloc() are
> already in the process of being added.

Can I leave this as-is (with the xzalloc_array()) and fix it up once
vzalloc() exists?

David

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