Hi,
sorry for taking so long to address your concerns.
> What happens if you run this new driver on an older hypervisor that
> does not support batched operations?
When the driver starts or when it gets reset the driver checks for the
capabilities of the hypervisor in vmballoon_send_start. Then it resets
it state and only uses the available functionality.
A reset happens any time the VM get hot migrated, snapshotted, resumed,
etc.
I tested this driver on various versions of ESXi to have a full set of
possible capabilities.
> > - if (allocations >= rate) {
> > + if (rate != -1 && allocations >= rate) {
> > /* We allocated enough pages, let's take a
> > break. */
>
> Why don't you make the rate UINT_MAX when doing fast allocations,
> then
> you would not need to treat -1 as a special case.
Good suggestion.
> > /* free pages to reach target */
> > list_for_each_entry_safe(page, next, &b->pages, lru) {
> > list_del(&page->lru);
> > b->ops->add_page(b, num_pages++, page);
> >
> > +
>
> Seems line unintended whitespace addition.
I could not find this in the code.
I will send out a new patch series addressing your concerns.
Thanks
PhilipN�����r��y����b�X��ǧv�^�){.n�+����{����zX����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?�����&�)ߢf��^jǫy�m��@A�a���
0��h���i