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)