From patchwork Wed May 22 21:12:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 245720 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A1F4E2C00A1 for ; Thu, 23 May 2013 07:12:55 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756877Ab3EVVMx (ORCPT ); Wed, 22 May 2013 17:12:53 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:35022 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754052Ab3EVVMx (ORCPT ); Wed, 22 May 2013 17:12:53 -0400 Received: from [173.51.221.202] (account joe@perches.com HELO [192.168.1.152]) by labridge.com (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 21028042; Wed, 22 May 2013 14:12:52 -0700 Message-ID: <1369257171.2143.120.camel@joe-AO722> Subject: Re: [PATCH v2 nf-next] netfilter: conntrack: remove the central spinlock From: Joe Perches To: Eric Dumazet Cc: Pablo Neira Ayuso , netfilter-devel@vger.kernel.org, netdev , Tom Herbert , Patrick McHardy Date: Wed, 22 May 2013 14:12:51 -0700 In-Reply-To: <1369255736.3301.358.camel@edumazet-glaptop> References: <1368068665.13473.81.camel@edumazet-glaptop> <1369244868.3301.343.camel@edumazet-glaptop> <1369246816.2143.84.camel@joe-AO722> <1369250772.3301.349.camel@edumazet-glaptop> <1369252624.2143.103.camel@joe-AO722> <1369253761.3301.355.camel@edumazet-glaptop> <1369255104.2143.108.camel@joe-AO722> <1369255736.3301.358.camel@edumazet-glaptop> X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Wed, 2013-05-22 at 13:48 -0700, Eric Dumazet wrote: > On Wed, 2013-05-22 at 13:38 -0700, Joe Perches wrote: > > > u16 for cpu is hardly used at all. > > Its used in network tree. > > The day it has to change, don't worry, I think we'll be able to handle > it. > > For the meantime, I do not want to add 4 more bytes to conntrack > structure, its already bloated enough. I wrote "nice" already, no worries. btw: netdevice.h could possibly convert xmit_lock_owner to u16 as well for that same 4 byte savings if the -1 test was converted too. --- include/linux/netdevice.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 60584b1..c38cd29 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -528,7 +528,7 @@ struct netdev_queue { * write mostly part */ spinlock_t _xmit_lock ____cacheline_aligned_in_smp; - int xmit_lock_owner; + u16 xmit_lock_owner; /* * please use this field instead of dev->trans_start */ @@ -2453,7 +2453,7 @@ static inline void __netif_tx_unlock_bh(struct netdev_queue *txq) static inline void txq_trans_update(struct netdev_queue *txq) { - if (txq->xmit_lock_owner != -1) + if (txq->xmit_lock_owner != (u16)-1) txq->trans_start = jiffies; }