linux-hardened/drivers/vhost
Michael S. Tsirkin 23cc5a991c vhost-net: extend device allocation to vmalloc
Michael Mueller provided a patch to reduce the size of
vhost-net structure as some allocations could fail under
memory pressure/fragmentation. We are still left with
high order allocations though.

This patch is handling the problem at the core level, allowing
vhost structures to use vmalloc() if kmalloc() failed.

As vmalloc() adds overhead on a critical network path, add __GFP_REPEAT
to kzalloc() flags to do this fallback only when really needed.

People are still looking at cleaner ways to handle the problem
at the API level, probably passing in multiple iovecs.
This hack seems consistent with approaches
taken since then by drivers/vhost/scsi.c and net/core/dev.c

Based on patch by Romain Francoise.

Cc: Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Romain Francoise <romain@orebokech.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
2014-06-09 16:21:05 +03:00
..
Kconfig vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
Makefile vhost: Make vhost a separate module 2013-07-07 17:33:44 +03:00
net.c vhost-net: extend device allocation to vmalloc 2014-06-09 16:21:05 +03:00
scsi.c target: Pass in transport supported PI at session initialization 2014-04-07 01:48:54 -07:00
test.c vhost: remove the dead branch 2013-12-06 15:22:05 -05:00
test.h vhost test module 2010-12-09 16:00:21 +02:00
vhost.c vhost: remove the dead branch 2013-12-06 15:22:05 -05:00
vhost.h vhost: remove the dead branch 2013-12-06 15:22:05 -05:00
vringh.c Add missing module license tag to vring helpers. 2013-05-08 10:49:03 +09:30