From owner-freebsd-current@FreeBSD.ORG Mon May 5 13:46:05 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AFDA437B401; Mon, 5 May 2003 13:46:05 -0700 (PDT) Received: from rms21.rommon.net (rms21.rommon.net [193.64.42.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02D9B43F3F; Mon, 5 May 2003 13:46:04 -0700 (PDT) (envelope-from pete@he.iki.fi) Received: from PHE (h93.vuokselantie10.fi [193.64.42.147]) by rms21.rommon.net (8.12.6p2/8.12.6) with SMTP id h45Kk1PG020696; Mon, 5 May 2003 23:46:01 +0300 (EEST) (envelope-from pete@he.iki.fi) Message-ID: <02ed01c31347$56f023d0$932a40c1@PHE> From: "Petri Helenius" To: "John Baldwin" References: Date: Mon, 5 May 2003 23:46:01 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: freebsd-current@FreeBSD.org cc: sos@FreeBSD.org Subject: Re: kthread_exit and giant X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 May 2003 20:46:06 -0000 > > The kthread is supposed to acquire Giant before calling kthread_exit(). > Actually, my guess is that the ar kthread needs to acquire Giant for the > lifetime of the thread. I have an untested patch locally: > I thought the lifetime of the thread is the duration of the rebuild process? Which can be minutes to hours. Locking giant for that kind of time does not sound right, so locking it just before thread exit sounds like the right thing to do, as long as the code othervise keeps critical sections locked. Pete