From owner-svn-src-user@FreeBSD.ORG Tue May 26 18:18:03 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13DC910656B0; Tue, 26 May 2009 18:18:03 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by mx1.freebsd.org (Postfix) with ESMTP id 42D068FC1A; Tue, 26 May 2009 18:18:01 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by ey-out-2122.google.com with SMTP id 9so840490eyd.7 for ; Tue, 26 May 2009 11:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=2n9oirohm9R9qTPcAdXkFbwejmL9DkWzmB5ZUYNO/kM=; b=GGSpPSI8AmAu0LUJH5gplIP12QWmoVo7OnFFnzKgQXlpKYmIN56IjRX+Y/2gDeF0sp 4Wm/MjmMP1iw6dKVwMAYA4XNdo9qiFA2AFuOkiNQNcQh0SaPOH2iQbnf6FlC05adUiqw PW/+eQTA8y3Nx9hLaR2nTxVyseRZz9JFuHJ0c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NEKegYjjd/ORTam79uX3ZW1zwFDeuVyhQFCxaHej6VhkaWkrhwXdmdTioKtAObNJ8K GDC/PBusU9bEeoBSZIucsGdszZjRLAJ2Chc3356D0Q/mdlHhu9qw3dXt0PeqwP8SD54t JhsvLRyYsCTx5Tbafg99Bi+OSjOgY96P67p+s= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.216.35.204 with SMTP id u54mr3315504wea.182.1243361880582; Tue, 26 May 2009 11:18:00 -0700 (PDT) In-Reply-To: <200905260830.36831.jhb@freebsd.org> References: <200905222145.n4MLjhm3019802@svn.freebsd.org> <200905260830.36831.jhb@freebsd.org> Date: Tue, 26 May 2009 11:18:00 -0700 X-Google-Sender-Auth: 355de525109af718 Message-ID: <3c1674c90905261118y282d9b0fn7d54630f507d8363@mail.gmail.com> From: Kip Macy To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r192604 - in user/kmacy/releng_7_2_fcs/sys: dev/hwpmc sys X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2009 18:18:03 -0000 On Tue, May 26, 2009 at 5:30 AM, John Baldwin wrote: > On Friday 22 May 2009 5:45:43 pm Kip Macy wrote: >> Author: kmacy >> Date: Fri May 22 21:45:43 2009 >> New Revision: 192604 >> URL: http://svn.freebsd.org/changeset/base/192604 >> >> Log: >> =A0 - remove pmc_kthread_mtx >> =A0 - replace sleep/wakeup on kthread with a condvar > > If you do not sleep on the kthread/kproc when waiting for a kthread to > exit, then you open up a race window. =A0Usually this matters more for > any kthreads that live in a module since the race allows the module to > be unmapped before the thread is finished executing code from the module > resulting in a fatal page fault in the kernel. Yes, that is why the kthread explicitly calls cv_signal after clearing the kthread pointer. Thanks, Kip