Please enable JavaScript.
Coggle requires JavaScript to display documents.
async copy_file_range - Coggle Diagram
async copy_file_range
key problems
page lifetime
simplify implementation
page_release
page reference is grabbed in ->splice_read
page reference needs to be dropped after the page is consumed
how to run async io
single task internal pipe
seekable pipe
each IO has one key, saved to pipe
buf lifetime
use bvec format
io_uring implementation
how to re-use current rw.c for copy_file_range()
understand io_wq
extend to async copy_file_range()
extend pipe for direct splice only
pipe_buf_operations is same for all pages in case of direct splice?
all bufs allocated in generic_file_splice_read belong to same type?
buf->flags & buf->private
facts
.splice_read / .splice_write
sync interface
pipe is locked
use current->splice_pipe
used only for splice_direct_to_actor
write zc idea
pipe
transfer io rquest pages from ublkc to backend FD
pages are just in userspace side
async copy_file_range
transfer ublkc request pages to backend FD
use kernel internal pipe
blocker
.splice_read/.splice_write use pipe_inode_info
how can we let .splice_read/.splice_write to handle the difference?
io_uring run the two IOs in async style
ideas
high level choices
userspace pipe
easy to implement
all kinds of limits
kernel space pipe
->current_pipe
concurrent async copy_file_range
seekable doesn't work too
allocated & dedicated pipe
it does work
heavy cost
mempool?
refactor pipe code
separate userspace/kernel pipe
cleanup current pipe code
figure out lightwight kernel pipe
no all userspace things
2 more items...
pass userspace buffer
add .produce() and .consume() ops for pipe
add two generic pipe ops