From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lai Jiangshan Subject: Re: [PATCH] netfilter: use per-cpu recursive lock (v11) Date: Tue, 21 Apr 2009 13:46:16 +0800 Message-ID: <49ED5DA8.4080206@cn.fujitsu.com> References: <49E72E83.50702@trash.net> <20090416.153354.170676392.davem@davemloft.net> <20090416234955.GL6924@linux.vnet.ibm.com> <20090417012812.GA25534@linux.vnet.ibm.com> <20090418094001.GA2369@ioremap.net> <20090418141455.GA7082@linux.vnet.ibm.com> <20090420103414.1b4c490f@nehalam> <49ECBE0A.7010303@cosmosbay.com> <18924.59347.375292.102385@cargo.ozlabs.ibm.com> <20090420215827.GK6822@linux.vnet.ibm.com> <18924.64032.103954.171918@cargo.ozlabs.ibm.com> <20090420160121.268a8226@nehalam> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Paul Mackerras , paulmck@linux.vnet.ibm.com, Eric Dumazet , Evgeniy Polyakov , David Miller , kaber@trash.net, torvalds@linux-foundation.org, jeff.chua.linux@gmail.com, mingo@elte.hu, jengelh@medozas.de, r000n@r000n.net, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, benh@kernel.crashing.org, mathieu.desnoyers@polymtl.ca To: Stephen Hemminger Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:64611 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750872AbZDUFsx (ORCPT ); Tue, 21 Apr 2009 01:48:53 -0400 In-Reply-To: <20090420160121.268a8226@nehalam> Sender: netfilter-devel-owner@vger.kernel.org List-ID: My silly opinion about lockdep in this patch: > + > +struct xt_info_lock { > + spinlock_t lock; + struct lock_class_key key; > + int depth; /* # readers - 1 */ > +}; > +static DEFINE_PER_CPU(struct xt_info_lock, xt_info_locks); > + > + > +static inline void xt_info_lock_init(struct xt_info_lock *lock) > +{ > + spin_lock_init(&lock->lock); + lockdep_set_class(&lock->lock, &lock->key); > + lock->depth = -1; > +} > + And remove lockdep_xxx()s.