Zero copy data transfer from Linuxulator to FreeBSD?

Hans Petter Selasky hps at selasky.org
Sat Apr 2 09:19:11 UTC 2016


On 04/01/16 17:18, Lundberg, Johannes wrote:
> Hi Luigi
>
> Since this is an embedded device running on battery every bit counts.
> However, this is kind of a temporary solution so I'm considering accepting
> it..
>
> At any rate, I am generally curious what mechanism there are for
> transferring data between Linux and native process in FreeBSD..
>

Hi,

libusb has only one copy to/from userspace. libusb v1.0 and v0.1 has 
some allocation during operation, while libusb v2.0 API doesn't.

There was an optimisation done recently about IOCTLs allocating memory 
for the data argument. Maybe that is what is causing the problem you saw?

Refer to SYS_IOCTL_SMALL_SIZE in sys/kern/ .

--HPS



More information about the freebsd-hackers mailing list