Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030413AbWARUXX (ORCPT ); Wed, 18 Jan 2006 15:23:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030418AbWARUXW (ORCPT ); Wed, 18 Jan 2006 15:23:22 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:62162 "HELO iolanthe.rowland.org") by vger.kernel.org with SMTP id S1030413AbWARUXW (ORCPT ); Wed, 18 Jan 2006 15:23:22 -0500 Date: Wed, 18 Jan 2006 15:23:20 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Benjamin LaHaise cc: Andrew Morton , Chandra Seetharaman , Keith Owens , Kernel development list Subject: Re: [PATCH 1/8] Notifier chain update In-Reply-To: <20060118181955.GF16285@kvack.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1385 Lines: 28 On Wed, 18 Jan 2006, Benjamin LaHaise wrote: > On Wed, Jan 18, 2006 at 11:34:12AM -0500, Alan Stern wrote: > > There are some limitations, which should not be too hard to live with. > > For atomic/blocking chains, registration and unregistration must > > always be done in a process context since the chain is protected by a > > mutex/rwsem. Also, a callout routine for a non-raw chain must not try > > to register or unregister entries on its own chain. (This did happen > > in a couple of places and the code had to be changed to avoid it.) > > This is bad, as rwsems are pretty much guaranteed to be a cache miss on > smp systems, so their addition makes these code paths scale much more > poorly than is needed. Given the current approach to modules, would it > not make sense to simply require that any code that the notifier paths > touch simply remain loaded in the kernel? In that case rcu protection > of the pointers would suffice for the hooks. You can't use RCU protection around code that may sleep. Whether the code remains loaded in the kernel or is part of a removable module doesn't enter into it. Alan Stern - 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/