Re: [PATCH v37 1/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT

From: Christian Borntraeger
Date: Fri Dec 28 2018 - 03:04:05 EST




On 28.12.2018 04:12, Wei Wang wrote:
> On 12/27/2018 08:03 PM, Christian Borntraeger wrote:
>> On 27.08.2018 03:32, Wei Wang wrote:
>>> Â static int init_vqs(struct virtio_balloon *vb)
>>> Â {
>>> -ÂÂÂ struct virtqueue *vqs[3];
>>> -ÂÂÂ vq_callback_t *callbacks[] = { balloon_ack, balloon_ack, stats_request };
>>> -ÂÂÂ static const char * const names[] = { "inflate", "deflate", "stats" };
>>> -ÂÂÂ int err, nvqs;
>>> +ÂÂÂ struct virtqueue *vqs[VIRTIO_BALLOON_VQ_MAX];
>>> +ÂÂÂ vq_callback_t *callbacks[VIRTIO_BALLOON_VQ_MAX];
>>> +ÂÂÂ const char *names[VIRTIO_BALLOON_VQ_MAX];
>>> +ÂÂÂ int err;
>>>
>>> ÂÂÂÂÂ /*
>>> -ÂÂÂÂ * We expect two virtqueues: inflate and deflate, and
>>> -ÂÂÂÂ * optionally stat.
>>> +ÂÂÂÂ * Inflateq and deflateq are used unconditionally. The names[]
>>> +ÂÂÂÂ * will be NULL if the related feature is not enabled, which will
>>> +ÂÂÂÂ * cause no allocation for the corresponding virtqueue in find_vqs.
>>> ÂÂÂÂÂÂ */
>> This might be true for virtio-pci, but it is not for virtio-ccw.
>
> Hi Christian,
>
>
> Please try the fix patches: https://lkml.org/lkml/2018/12/27/336

See answer to that thread. It fixes the random boot crashes.
There is still the regression that ballooning does no longer work on
s390 (see the call trace).