On Sat, Jun 21, 2008 at 11:28 AM, Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote: > You can also hack into socket code like tcp_sendmsg()/tcp_sendpage() > (the latter is not used in CIFS though) Your point about tcp_sendpage reminds me of something I have been wondering about for a while. Since SunRPC switched to kernel_sendpage I have been wondering whether that is better or worse than kernel_sendmsg. It looks like in some cases sendpage simply falls back to calling sendmsg with 1 iovec (instead of calling tcp_sendpage which calls do_tcp_sendpages) which would end up being slower than calling sendmsg with a larger iovec as we do in smb_send2 in the write path. For the write case in which we are writing pages (that are aligned) out of the page cache to the socket would sendpage be any faster than sendmsg? (I wish there was a sendmultiple pages call where I could pass the whole list of pages). How should a piece of kernel code check to see if sendpage is supported/faster and when to use kernel_sendpage and when to use sendmsg with the pages in the iovec -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html