Writing to user file from kernel
Hi, I know this is taboo and so on.But, i would like to know the difference between 'vfs_read' (similar to description in linux journal article : http://www.linuxjournal.com/article/8110) and the call 'splice_direct_to_actor'. 'vfs_read' is strightforward but i don't understand the api 'splice_direct_to_actor'. Is there any documentation which will explain it to me and where it is used. Because as i see it you can read a file using either of the two 'vfs_read' or 'splice_direct_to_actor'. But, which is better. Regards, Neha
On Tue, 05 Nov 2013 16:03:57 -0700, neha naik said:
'vfs_read' is strightforward but i don't understand the api 'splice_direct_to_actor'. Is there any documentation which will explain it to me and where it is used. Because as i see it you can read a file using either of the two 'vfs_read' or 'splice_direct_to_actor'. But, which is better.
Depends what yoiu're trying to do. They do different things. read() is pretty much what Unixoid systems have been doing for 4 decades now. splice() allows you to connect a socket or a pipe directly to a file https://en.wikipedia.org/wiki/Splice_%28system_call%29
participants (2)
-
neha naik -
Valdis.Kletnieks@vt.edu