kernel_optimize_test/drivers/vhost
Jason Wang 5ce995f313 vhost: use mmgrab() instead of mmget() for non worker device
For the device that doesn't use vhost worker and use_mm(), mmget() is
too heavy weight and it may brings troubles for implementing mmap()
support for vDPA device.

This is because, an reference to the address space was held via
mm_get() in vhost_dev_set_owner() and an reference to the file was
held in mmap(). This means when process exits, the mm can not be
released thus we can not release the file.

This patch tries to use mmgrab() instead of mmget(), which allows the
address space to be destroy in process exit without releasing the mm
structure itself. This is sufficient for vDPA device which pin user
pages and does not depend on the address space to work.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20200529080303.15449-3-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-06-04 15:36:51 -04:00
..
iotlb.c vhost: factor out IOTLB 2020-04-01 12:06:26 -04:00
Kconfig vhost: revert "vhost: disable for OABI" 2020-06-02 02:45:13 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00
scsi.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00
test.c virtio/test: fix up after IOTLB changes 2020-04-16 18:31:08 -04:00
test.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdpa.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00
vhost.c vhost: use mmgrab() instead of mmget() for non worker device 2020-06-04 15:36:51 -04:00
vhost.h vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00
vringh.c virtio: force spec specified alignment on types 2020-06-02 02:45:13 -04:00
vsock.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00