Date: Sun, 9 Sep 2012 22:09:44 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Attilio Rao <attilio@freebsd.org> Cc: Davide Italiano <davide@freebsd.org>, svn-src-projects@freebsd.org, src-committers@freebsd.org, John Baldwin <jhb@freebsd.org> Subject: Re: svn commit: r238907 - projects/calloutng/sys/kern Message-ID: <20120909190944.GO33100@deviant.kiev.zoral.com.ua> In-Reply-To: <CAJ-FndARWZGwdiLeaQcnM%2BM%2Bm8zmBLuMrTkgoCFeesXPR=08pA@mail.gmail.com> References: <201207301350.q6UDobCI099069@svn.freebsd.org> <CAJ-FndBj8tpC_BJXs_RH8sG2TBG8yA=Lxu3-GTVT9Ap_zOCuVQ@mail.gmail.com> <CAJ-FndDnO7wjnWPV0tTu%2BUGHjsxa3YDarMxmyei3ZmjLAFvRkQ@mail.gmail.com> <201207301732.33474.jhb@freebsd.org> <CAJ-FndD5EO12xsWOAe6u0EvX00q33wxO4OivnGjzj0=T2Oe8uA@mail.gmail.com> <CAJ-FndARWZGwdiLeaQcnM%2BM%2Bm8zmBLuMrTkgoCFeesXPR=08pA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <attilio@freebsd.org> wrote: > > On 7/30/12, John Baldwin <jhb@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120909190944.GO33100>