-----邮件原件----- 发件人: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org] 代表 Willem de Bruijn 发送时间: 2020年3月26日 9:21 收件人: Yi Yang (杨燚)-云服务集团 抄送: yang_y_yi@163.com; netdev@vger.kernel.org; u9012063@gmail.com 主题: [vger.kernel.org代发]Re: [vger.kernel.org代发]Re: [PATCH net-next] net/ packet: fix TPACKET_V3 performance issue in case of TSO On Wed, Mar 25, 2020 at 8:45 PM Yi Yang (杨燚)-云服务集团 wrote: > > By the way, even if we used hrtimer, it can't ensure so high performance improvement, the reason is every frame has different size, you can't know how many microseconds one frame will be available, early timer firing will be an unnecessary waste, late timer firing will reduce performance, so I still think the way this patch used is best so far. > The key differentiating feature of TPACKET_V3 is the use of blocks to efficiently pack packets and amortize wake ups. If you want immediate notification for every packet, why not just use TPACKET_V2? [Yi Yang] For non-TSO packet, TPACKET_V3 is much better than TPACKET_V2, but for TSO packet, it is bad, we prefer to use TPACKET_V3 for better performance. [Yi Yang]