]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not map small IOCTL buffers to KVA, but copy.
authormav <mav@FreeBSD.org>
Thu, 28 Mar 2019 20:41:02 +0000 (20:41 +0000)
committermav <mav@FreeBSD.org>
Thu, 28 Mar 2019 20:41:02 +0000 (20:41 +0000)
commit4ef45ba40d370005ccef60735b3c1b9fa3a67a9d
tree95c3801f568afc184d67c6c8cf13bd9ef50b005a
parent3c0065a48fee3f15bf85f48380f943c1ba35602a
Do not map small IOCTL buffers to KVA, but copy.

CAM IOCTL interfaces traditionally mapped user-space data buffers to KVA.
It was nice originally, but now it takes too much to handle respective
TLB shootdowns, while small kernel memory allocations up to 64KB backed
by UMA and accompanied by copyin()/copyout() can be much cheaper.

For large buffers mapping still may have sense, and unmapped I/O would
be even better, but the last unfortunately is more tricky, since unmapped
I/O API is too specific to struct bio now.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
sys/cam/cam_periph.c
sys/cam/cam_periph.h