Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934316AbbEMDGD (ORCPT ); Tue, 12 May 2015 23:06:03 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:49022 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933994AbbEMDGA (ORCPT ); Tue, 12 May 2015 23:06:00 -0400 Date: Tue, 12 May 2015 23:05:58 -0400 (EDT) Message-Id: <20150512.230558.437567720437090973.davem@davemloft.net> To: dvlasenk@redhat.com Cc: alexei.starovoitov@gmail.com, alexander.duyck@gmail.com, joe@perches.com, jpirko@redhat.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [PATCH] net: deinline netif_tx_stop_all_queues(), remove WARN_ON in netif_tx_stop_queue() From: David Miller In-Reply-To: <1431371873-26969-1-git-send-email-dvlasenk@redhat.com> References: <1431371873-26969-1-git-send-email-dvlasenk@redhat.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / 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.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 12 May 2015 20:06:00 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1552 Lines: 41 From: Denys Vlasenko Date: Mon, 11 May 2015 21:17:53 +0200 > These functions compile to 60 bytes of machine code each. > With this .config: http://busybox.net/~vda/kernel_config > there are 617 calls of netif_tx_stop_queue() > and 49 calls of netif_tx_stop_all_queues() in vmlinux. > > To fix this, remove WARN_ON in netif_tx_stop_queue() > as suggested by davem, and deinline netif_tx_stop_all_queues(). > > Change in code size is about 20k: > > text data bss dec hex filename > 82426986 22255416 20627456 125309858 77813a2 vmlinux.before > 82406248 22255416 20627456 125289120 777c2a0 vmlinux > > gcc-4.7.2 still creates deinlined version of netif_tx_stop_queue > sometimes: > > $ nm --size-sort vmlinux | grep netif_tx_stop_queue | wc -l > 190 > > ffffffff81b558a8 : > ffffffff81b558a8: 55 push %rbp > ffffffff81b558a9: 48 89 e5 mov %rsp,%rbp > ffffffff81b558ac: f0 80 8f e0 01 00 00 lock orb $0x1,0x1e0(%rdi) > ffffffff81b558b3: 01 > ffffffff81b558b4: 5d pop %rbp > ffffffff81b558b5: c3 retq > > This needs additional fixing. > > Signed-off-by: Denys Vlasenko Applied, thank you. -- 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/