User: Password:
Subscribe / Log in / New account

How does this differ from aio_write?

How does this differ from aio_write?

Posted Apr 27, 2006 15:32 UTC (Thu) by kingdon (guest, #4526)
Parent article: The splice() weekly news

Seems like there is a more familiar interface for saying "write this data at some point, and let me know when you are done so I can reuse (or de-mmap) this memory", namely aio_write (or lio_listio where there are several noncontiguous blocks of memory).

Now, there might be various semantic differences (like whether one has to write entire pages or can write less), but I'm curious whether the two things could/should be separate or unified.

(Log in to post comments)

The tricky part...

Posted Apr 27, 2006 16:33 UTC (Thu) by axboe (subscriber, #904) [Link]

isn't so much how to notify reusability, but rather when to determine the safety of doing so. We still need to change a bit of infrastructure for this - eg, get rid of ->sendpage() and actually pass the pipe_inode_info down for network transmit and only have it do the ->release on the buffers when they have been sent out. The issue right now is that the ->release is done as soon as we pass the page to the network stack, which is too soon of course.

What does vmsplice() add?

Posted Apr 28, 2006 2:17 UTC (Fri) by xoddam (subscriber, #2322) [Link]

Determining completion is indeed tricky, especially where remote hosts
are involved. But there are already two good choices for the interface:
write() blocks until the buffer may be reused by the application,
aio_write() instead posts a notification. What does vmsplice() add?

(Changing to a vector operation changes the names of the functions, but
not the nature of the question).

What does vmsplice() add?

Posted Apr 28, 2006 4:21 UTC (Fri) by axboe (subscriber, #904) [Link]

Blocking on the next vmsplice comes automatically, since you can't replace buffers that haven't been ->release'd yet. So that's how it already works. As I said, the missing bit is getting the release right.

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds