Re: io_uring is zero copy or not?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi DongLi,

Thanks for your response.

The 'copy' means the data from userspace buffer could be direct to be
written to the device.
The kernel doesn't need to allocate a new buffer and copy the data in it.
Copy data is a wast for performance.

I don't know the block layer need to allocate a new buffer or not.
>From the io_uring.c code, the kernel directly grab the pages of
userspace data buffer through the `get_user_pages`.

Dongli Zhang <dongli.zhang@xxxxxxxxxx> 于2019年4月15日周一 上午11:21写道:
>
>
>
> On 4/15/19 11:09 AM, Feng Li wrote:
> > Hi Jens,
> >
> > I'm interested in the io_uring, and have a doubt about it.
> > If I setup io_uring with IORING_REGISTER_BUFFERS,
> > the kernel doesn't need copy data from user space to the kernel, right?
> > Does it mean this is a zero-copy feature?
>
> Doesn't it depends on the definition of 'copy'?
>
> There is still a copy from original userspace pages to the registered buffer?
>
> Dongli Zhang
>
> >
> > From the code, kernel directly get the userspace virtual address's
> > pages and store them:
> >
> > 2475 pret = get_user_pages_longterm(ubuf, nr_pages, FOLL_WRITE,
> > 2476 pages, vmas);
> >
> >
> >



-- 
Thanks and Best Regards,
Feng Li(Alex)




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux