From owner-svn-src-user@FreeBSD.ORG Tue May 26 18:41:05 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 CF0581065687; Tue, 26 May 2009 18:41:05 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0808FC1A; Tue, 26 May 2009 18:41:04 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by ey-out-2122.google.com with SMTP id 9so843622eyd.7 for ; Tue, 26 May 2009 11:41:04 -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=octLtWgQFkhmpCfZHYZ+KGj8Xi/bZZZ6H9c/0reGKfk=; b=dn4cgpUPraxmMFIR0R/r80DeZSm8d8fupSG2jNsidFvkrv2+EHBfIyI6eMLiFJlk8e iQ3IHIVSQLjNCwAo/MLaxqzV+koLywS2MjR1JoOXKWbLQWklmsc/2tXQVbt2jSrV/A67 SRqzdFDOG3wIy7s2hiZktKEO/UvkUzkAB5tUg= 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=qNk9e/XcngFDnT4rDTmn6G9yVzprihDAhlNNyNVxdsk4XCwcTiO9FZousiozjq0ZMG Uv/31Z8JPSe10iown4QBYfgmTUW1uAndjqSvNZ45+/B8gTLTG3YssH5qzrLXEIFZIXDO 1sjxKDL4iV1LVZUlscwK42UnqtcI6956YB5Fs= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.216.9.66 with SMTP id 44mr3225917wes.73.1243363263915; Tue, 26 May 2009 11:41:03 -0700 (PDT) In-Reply-To: <200905261437.49148.jhb@freebsd.org> References: <200905222145.n4MLjhm3019802@svn.freebsd.org> <200905260830.36831.jhb@freebsd.org> <3c1674c90905261118y282d9b0fn7d54630f507d8363@mail.gmail.com> <200905261437.49148.jhb@freebsd.org> Date: Tue, 26 May 2009 11:41:03 -0700 X-Google-Sender-Auth: b215c9230f108ef7 Message-ID: <3c1674c90905261141n44bc7c24h5b82a2e25b84f1eb@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:41:06 -0000 ter. > > Umm, that doesn't help. =A0Your kthread's main routine is "physically" lo= cated > in your kld. =A0It needs to get into the text of kthread_exit() before it= is > safe for your module to unload, and so you have to sleep on the kthread/k= proc > pointer to wait for the wakeup in kthread_exit() to fire. =A0You could ha= ve > easily used msleep_spin() for this w/o hacking up condvar's to support sp= in > locks too, FWIW. > Good point. Which gets to my next question. Why is condvar preferred to msleep / wakeup for everything BUT spin locks? This seems a bit hackish. Thanks, Kip