关于tcp的prequeue的一些说明
2008-01-08 15:50
330 查看
Here's a patch to make that prequeue comment a little clearer. Look ok?
Signed-off-by: Andy Grover <andrew.grover@xxxxxxxxx>
===== include/net/tcp.h 1.105 vs edited =====
--- 1.105/include/net/tcp.h 2005-02-22 10:45:31 -08:00
+++ edited/include/net/tcp.h 2005-04-28 14:02:43 -07:00
@@ -1560,6 +1560,13 @@
* idea (VJ's mail "Re: query about TCP header on tcp-ip" of 07 Sep 93)
* failed somewhere. Latency? Burstiness? Well, at least now we will
* see, why it failed. 8)8) --ANK
+ *
+ * Actually, even though the prequeue is not as important for fast
+ * csum anymore, it is important for scheduling, to generate ACKs
+ * when the data is received by the process, not the stack.
+ * davem says, "Without prequeue, we ACK immediately. This artificially
+ * makes the sender believe it can pump data out at that rate to the
+ * receiver."
*
* NOTE: is this not too big to inline?
*/
The TCP prequeue thing is based on old facts, and has drawbacks.
1) It adds 48 bytes per 'struct tcp_sock'
2) It adds some ugly code in hot paths
3) It has a small hit ratio on typical servers using many sockets
4) It may have a high hit ratio on UP machines running one process,
where the prequeue adds litle gain. (In fact, letting the user
doing the copy after being woke up is better for cache reuse)
5) Doing a copy to user in softirq handler is not good, because of
potential page faults :(
6) Maybe the NET_DMA thing is the only thing that might need prequeue.
Signed-off-by: Andy Grover <andrew.grover@xxxxxxxxx>
===== include/net/tcp.h 1.105 vs edited =====
--- 1.105/include/net/tcp.h 2005-02-22 10:45:31 -08:00
+++ edited/include/net/tcp.h 2005-04-28 14:02:43 -07:00
@@ -1560,6 +1560,13 @@
* idea (VJ's mail "Re: query about TCP header on tcp-ip" of 07 Sep 93)
* failed somewhere. Latency? Burstiness? Well, at least now we will
* see, why it failed. 8)8) --ANK
+ *
+ * Actually, even though the prequeue is not as important for fast
+ * csum anymore, it is important for scheduling, to generate ACKs
+ * when the data is received by the process, not the stack.
+ * davem says, "Without prequeue, we ACK immediately. This artificially
+ * makes the sender believe it can pump data out at that rate to the
+ * receiver."
*
* NOTE: is this not too big to inline?
*/
The TCP prequeue thing is based on old facts, and has drawbacks.
1) It adds 48 bytes per 'struct tcp_sock'
2) It adds some ugly code in hot paths
3) It has a small hit ratio on typical servers using many sockets
4) It may have a high hit ratio on UP machines running one process,
where the prequeue adds litle gain. (In fact, letting the user
doing the copy after being woke up is better for cache reuse)
5) Doing a copy to user in softirq handler is not good, because of
potential page faults :(
6) Maybe the NET_DMA thing is the only thing that might need prequeue.
相关文章推荐
- WPF:关于Slider控件的一些说明
- 关于smarty3的一些说明
- 关于MYSQL的配置文件my.cnf 一些存放位置和配置说明
- 关于对我Blog一些文章的说明
- 关于网络编程中MTU、TCP、UDP优化配置的一些总结
- 关于Debian源的一些简单说明
- 关于android控件PopupMenu使用的一些说明
- 关于java内存说明的一些帖子整理(待研究)
- 关于Android RenderScript 的详细说明和一些实用文档
- 关于readonly的一些说明
- 关于TCP/IP数据包结构一文的进一步说明(常见协议数据报结构及TCP三次握手机制)
- 关于MSCOMM控件的一些说明第1/2页
- 关于Erlang和SMP的一些说明
- selenium webdirver之ruby-关于grid的一些说明
- (二)关于Unity3d面试的一些说明
- 关于使用PRO*C编程的一些简单说明和例子
- [ZBLOG]关于4u-HK的一些说明
- 关于Yaf的一些说明[转Yaf作者]
- 关于SpringMVC注解的一些补充说明
- 关于龙芯2号的一些说明(转载自LinuxFans.org)