From: Bart V. A. <bva...@ac...> - 2012-02-27 11:54:50
|
On Mon, Feb 27, 2012 at 8:17 AM, Subranshu Patel - ERS, HCL Tech < Sub...@hc...> wrote: > ** ** > > Suppose I am not using the put_page_callback patch.**** > > ** ** > > In case of kernel device handler, sock->ops->sendpage is invoked (zero > copy); in case of userspace handler (scst_user) sock_no_sendpage is > invoked. sock_no_sendpage invokes kernel_sendmsg which means an additional > copy of data.**** > > ** ** > > **1. **What is the reason that if we use kernel device handler, the > buffer is not freed or reused until sendpage completes sending data? **** > > Because sendpage() invokes get_page() before returning and put_page() after sending finished. Bart. |