Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752595AbbBXVKD (ORCPT ); Tue, 24 Feb 2015 16:10:03 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:50952 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbbBXVKC (ORCPT ); Tue, 24 Feb 2015 16:10:02 -0500 Date: Tue, 24 Feb 2015 16:09:58 -0500 (EST) Message-Id: <20150224.160958.1491397927638460390.davem@davemloft.net> To: al.drozdov@gmail.com Cc: dborkman@redhat.com, edumazet@google.com, viro@zeniv.linux.org.uk, willemb@google.com, mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dan@dcollins.co.nz, guy@alum.mit.edu Subject: Re: [RESEND PATCH] af_packet: don't pass empty blocks for PACKET_V3 From: David Miller In-Reply-To: <1424755108-10493-1-git-send-email-al.drozdov@gmail.com> References: <1423115891-3578-1-git-send-email-al.drozdov@gmail.com> <1424755108-10493-1-git-send-email-al.drozdov@gmail.com> X-Mailer: Mew version 6.5 on Emacs 24.1 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.7 (shards.monkeyblade.net [149.20.54.216]); Tue, 24 Feb 2015 13:10:01 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 20 From: Alexander Drozdov Date: Tue, 24 Feb 2015 08:18:28 +0300 > Before da413eec729d ("packet: Fixed TPACKET V3 to signal poll when block is > closed rather than every packet") poll listening for an af_packet socket was > not signaled if there was no packets to process. After the patch poll is > signaled evety time when block retire timer expires. That happens because > af_packet closes the current block on timeout even if the block is empty. > > Passing empty blocks to the user not only wastes CPU but also wastes ring > buffer space increasing probability of packets dropping on small timeouts. > > Signed-off-by: Alexander Drozdov Applied, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/