From owner-freebsd-hackers@FreeBSD.ORG Thu Aug 5 16:17:41 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47C4D106568E; Thu, 5 Aug 2010 16:17:41 +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 9C2088FC23; Thu, 5 Aug 2010 16:17:40 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o75GHanL023307 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Aug 2010 19:17:36 +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.4/8.14.4) with ESMTP id o75GHani076009; Thu, 5 Aug 2010 19:17:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o75GHai0076008; Thu, 5 Aug 2010 19:17:36 +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: Thu, 5 Aug 2010 19:17:36 +0300 From: Kostik Belousov To: mdf@freebsd.org Message-ID: <20100805161736.GG22295@deviant.kiev.zoral.com.ua> References: <201007301031.34266.jhb@freebsd.org> <201008041026.17553.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O1CYMfe3aCBmNHuM" 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=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_05, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: sched_pin() versus PCPU_GET X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2010 16:17:41 -0000 --O1CYMfe3aCBmNHuM Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 05, 2010 at 09:01:22AM -0700, mdf@freebsd.org wrote: > On Wed, Aug 4, 2010 at 9:20 AM, wrote: > > On Wed, Aug 4, 2010 at 2:26 PM, John Baldwin wrote: > >> Actually, I would beg to differ in that case. =9AIf PCPU_GET(spinlocks) > >> returns non-NULL, then it means that you hold a spin lock, > > > > ll_count is 0 for the "correct" pc_spinlocks and non-zero for the > > "wrong" one, though. =9ASo I think it can be non-NULL but the current > > thread/CPU doesn't hold a spinlock. > > > > I don't believe we have any code in the NMI handler. =9AI'm on vacation > > today so I'll check tomorrow. >=20 > I checked and ipi_nmi_handler() doesn't appear to have any local > changes. I assume that's where I should look? I think that, in case you do not use hwpmc, you could add "iretq" as the first instruction of the nmi handler in exception.S and see whether the issue is reproducable. --O1CYMfe3aCBmNHuM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxa5CAACgkQC3+MBN1Mb4jYQQCg9Z+MoEIQH9Et1KshKjOMdAAn SvgAn1Bm81F/ZJIz76TF9CucVL8Fh3Vt =WE3y -----END PGP SIGNATURE----- --O1CYMfe3aCBmNHuM--