]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r345656: Do not map small IOCTL buffers to KVA, but copy.
authorAlexander Motin <mav@FreeBSD.org>
Fri, 26 Apr 2019 17:21:12 +0000 (17:21 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Fri, 26 Apr 2019 17:21:12 +0000 (17:21 +0000)
commitdf481efae4eaa1c9f1fdab04e399241d4326db8a
treec1a6ef1e8002aab2dd85e2175a31a71664fe033f
parentb0b55210bfac9e04eda6633dee08068f167b3c06
MFC r345656: 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.

Sponsored by: iXsystems, Inc.
sys/cam/cam_periph.c
sys/cam/cam_periph.h