Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753545Ab0FHIci (ORCPT ); Tue, 8 Jun 2010 04:32:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34447 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751533Ab0FHIcf (ORCPT ); Tue, 8 Jun 2010 04:32:35 -0400 Message-ID: <4C0E00F6.8020409@redhat.com> Date: Tue, 08 Jun 2010 16:36:06 +0800 From: Cong Wang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Shredder/3.0.4 MIME-Version: 1.0 To: David Miller CC: andy@greyhouse.net, fubar@us.ibm.com, fbl@sysclose.org, linux-kernel@vger.kernel.org, mpm@selenic.com, netdev@vger.kernel.org, bridge@lists.linux-foundation.org, gospo@redhat.com, nhorman@tuxdriver.com, jmoyer@redhat.com, shemminger@linux-foundation.org, bonding-devel@lists.sourceforge.net Subject: Re: [v5 Patch 1/3] netpoll: add generic support for bridge and bonding devices References: <4C062CBD.7090906@redhat.com> <20100604191841.GM7497@gospo.rdu.redhat.com> <4C0CC29D.9070507@redhat.com> <20100607.030108.235696592.davem@davemloft.net> In-Reply-To: <20100607.030108.235696592.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1265 Lines: 35 On 06/07/10 18:01, David Miller wrote: > From: Cong Wang > Date: Mon, 07 Jun 2010 17:57:49 +0800 > >> Hmm, I still feel like this way is ugly, although it may work. >> I guess David doesn't like it either. > > Of course I don't like it. :-) > > I suspect the locking scheme will need to be changed. > > Besides, if we're going to hack this up and do write lock attempts in > the read locking paths, there is no point in using a rwlock any more. > And I'm personally in disfavor of all rwlock usage anyways (it dirties > the cacheline for readers just as equally for writers, and if the > critically protected code path is short enough, that shared cache > line atomic operation will be the predominant cost). > > So I'd say, 1) make this a spinlock and 2) try to use RCU for the > read path. > > That would fix everything. Yeah, agreed. Even not talking about netconsole, bonding code does have locking problems, netconsole just makes this problem clear. I will try your suggestions above. 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/