From owner-freebsd-ia64@FreeBSD.ORG Tue Feb 3 19:44:15 2009 Return-Path: Delivered-To: ia64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3BD31065670 for ; Tue, 3 Feb 2009 19:44:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B3FD18FC1A for ; Tue, 3 Feb 2009 19:44:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 3F42D46B06; Tue, 3 Feb 2009 14:44:15 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n13Ji6aj052166; Tue, 3 Feb 2009 14:44:09 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Marcel Moolenaar Date: Tue, 3 Feb 2009 14:43:57 -0500 User-Agent: KMail/1.9.7 References: <200902021344.19249.jhb@freebsd.org> <200902031107.52507.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902031443.57824.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 03 Feb 2009 14:44:09 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8946/Tue Feb 3 07:32:04 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: ia64@freebsd.org Subject: Re: Change ia64 mca sysctls to use standard dynamic sysctls X-BeenThere: freebsd-ia64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the IA-64 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 19:44:16 -0000 On Tuesday 03 February 2009 2:09:35 pm Marcel Moolenaar wrote: > > On Feb 3, 2009, at 8:07 AM, John Baldwin wrote: > > > On Monday 02 February 2009 7:59:11 pm Marcel Moolenaar wrote: > >> > >> On Feb 2, 2009, at 10:44 AM, John Baldwin wrote: > >> > >>> While working on the locking for the sysctl tree, I ran into the > >>> pseudo-dynamic machine check sysctls in ia64. It is not really a > >>> good idea > >>> to call sysctl_register_oid() with a spin lock held and once I add > >>> locking to > >>> sysctl it becomes a bad LOR. This changes the code to use the > >>> public API for > >>> adding dynamic sysctls outside of the spin lock. Please test this > >>> as it is a > >>> prerequisite for finishing the locking of the sysctl tree. > >> > >> This won't be a solution, because eventually this code gets called > >> for machine checks, which means that locks can be held (which is > >> then the least of our worries :-) > >> > >> In any case: malloc(M_WAITOK) cannot be used. We should probably > >> delay updating the sysctl tree and do it in a more controlled > >> environment. If you can implement a simple linked list to store > >> the saved state and remove the call to SYSCTL_ADD_OID, then I'll > >> work on that part after you're done. Does that sound like a plan? > > > > Ok. Checking for failures from M_NOWAIT is important, too. :) Here's > > an updated patch that uses the queue. I haven't implemented the stuff > > to schedule calls to the populate routine to drain the queue though. > > Would you be able to do that? > > Yes, I will. Getting everything right takes some careful > testing and probably requires deliberate error injection. > I can't ask that of you :-) Heh, is it ok with you if I commit this patch for now (after cross-compiling it) so I can commit the sysctl locking? -- John Baldwin