On 07/11/2016 07:22 PM, Mikulas Patocka wrote: > Don't print warning if memory allocation fails. The virtio driver can > handle allocation failure (it falls back to direct sglist), so there is > no functionality degradation. > > This warning was observed when swapping to virtio scsi device because > there may be not enough free memory during swapping. > > Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > > --- > drivers/virtio/virtio_ring.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > Index: linux-4.7-rc7/drivers/virtio/virtio_ring.c > =================================================================== > --- linux-4.7-rc7.orig/drivers/virtio/virtio_ring.c 2016-05-09 17:45:04.000000000 +0200 > +++ linux-4.7-rc7/drivers/virtio/virtio_ring.c 2016-07-11 17:30:20.000000000 +0200 > @@ -237,6 +237,12 @@ static struct vring_desc *alloc_indirect > */ > gfp &= ~__GFP_HIGHMEM; > > + /* > + * Don't warn if the allocation fails, because the driver > + * handles allocation failures gracefully. > + */ > + gfp |= __GFP_NOWARN; > + > desc = kmalloc(total_sg * sizeof(struct vring_desc), gfp); > if (!desc) > return NULL; > _______________________________________________ > Virtualization mailing list > Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx > https://lists.linuxfoundation.org/mailman/listinfo/virtualization > _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization