[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH V2 2/7] xen/grants: support allocating consecutive grants
On 12.05.22 00:09, Boris Ostrovsky wrote: Hello Boris On 5/11/22 2:00 PM, Oleksandr wrote:On 07.05.22 21:19, Oleksandr Tyshchenko wrote: Hello Boris, StefanoFrom: Juergen Gross <jgross@xxxxxxxx> For support of virtio via grant mappings in rare cases larger mappings using consecutive grants are needed. Support those by adding a bitmap of free grants. As consecutive grants will be needed only in very rare cases (e.g. when configuring a virtio device with a multi-page ring), optimize for the normal case of non-consecutive allocations. Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- Changes RFC -> V1: - no changes Changes V1 -> V2: - no changesMay I please ask for the review here?I had a quick look but I am stuck on get_free_seq(), I need to stare at it some more. Unless someone else reviews this, I will try to get to this in the next couple of days. Thank you! One thing I did notice is@@ -1452,6 +1624,13 @@ int gnttab_init(void) } }+ i = gnttab_interface->grefs_per_grant_frame * max_nr_grant_frames;+ gnttab_free_bitmap = bitmap_zalloc(i, GFP_KERNEL); + if (!gnttab_free_bitmap) { + ret = -ENOMEM; + goto ini_nomem; + }This overwrites 'i' and will break error handling at ini_nomem. Indeed, will fix. Thank you for pointing this out. -boris -- Regards, Oleksandr Tyshchenko
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |