From owner-svn-src-projects@FreeBSD.ORG Sun Sep 9 19:09:48 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7299F1065673; Sun, 9 Sep 2012 19:09:48 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 7FBD78FC0A; Sun, 9 Sep 2012 19:09:47 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q89J9ujl089962; Sun, 9 Sep 2012 22:09:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q89J9iIe098591; Sun, 9 Sep 2012 22:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q89J9iNw098590; Sun, 9 Sep 2012 22:09:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 9 Sep 2012 22:09:44 +0300 From: Konstantin Belousov To: Attilio Rao Message-ID: <20120909190944.GO33100@deviant.kiev.zoral.com.ua> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <201207301732.33474.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="boFd84b/DoLkbats" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: Davide Italiano , svn-src-projects@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 19:09:48 -0000 --boFd84b/DoLkbats Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 09, 2012 at 04:03:14PM +0100, Attilio Rao wrote: > On 8/2/12, Attilio Rao wrote: > > On 7/30/12, John Baldwin wrote: >=20 > [ trimm ] >=20 > >> --- //depot/projects/smpng/sys/kern/subr_turnstile.c 2012-06-04 > >> 18:27:32.000000000 0000 > >> +++ //depot/user/jhb/lock/kern/subr_turnstile.c 2012-06-05 > >> 00:27:57.000000000 0000 > >> @@ -684,6 +684,7 @@ > >> if (owner) > >> MPASS(owner->td_proc->p_magic =3D=3D P_MAGIC); > >> MPASS(queue =3D=3D TS_SHARED_QUEUE || queue =3D=3D TS_EXCLUSIVE_QUEU= E); > >> + KASSERT(!TD_IS_IDLETHREAD(td), ("idle threads cannot block on locks"= )); > >> > >> /* > >> * If the lock does not already have a turnstile, use this thread's > > > > I'm wondering if we should also use similar checks in places doing > > adaptive spinning (including the TD_NO_SLEEPING check). Likely yes. >=20 > So what do you think about this? My 2 cents are that is would be useful both to show the kind of lock (mutex/rw/sx/lockmgr etc) as well as the lock name. Ideally, the offending lock address would be also printed, because our kgdb dwarf parser does not work much more often then it works. --boFd84b/DoLkbats Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBM6XcACgkQC3+MBN1Mb4im8ACfU5EM6WbGjSXx6EqZruJzKKqo ViUAn10ERi8PRJ50KMeZicIXVnkO/F1a =MmP2 -----END PGP SIGNATURE----- --boFd84b/DoLkbats--