From mboxrd@z Thu Jan 1 00:00:00 1970 From: gd1100@gmail.com (Grzegorz Dwornicki) Date: Tue, 27 Jan 2015 17:49:33 +0100 Subject: No subject Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Keepalive question Hello I am bothered with very simple situaction. Lets say we have a TCP connection: S1 <----> S2 Lets assume that this connection is using blocking sockets. and that both hosts: s1 and s2 are using SO_KEEPALIVE. If they both are not using this connection then the kernel? is sending packets with no data to keep connection alive. I have marked "the kernel?" because I am not sure who does this. I think its the kernel but I am not sure. What would happen if only one of them would use keepalive? Could that empty packet break the loop inside of sk_busy_loop function and return empty data to the application layer? Or would that while loop body just re-run? Hehe is the code (the while loop starts on 128 line) http://lxr.oss.org.cn/source/include/net/busy_poll.h?a=arm#L95