From owner-svn-src-projects@FreeBSD.ORG Mon Jul 30 15:31:51 2012 Return-Path: Delivered-To: svn-src-projects@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8E7106566C; Mon, 30 Jul 2012 15:31:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 950E08FC1C; Mon, 30 Jul 2012 15:31:50 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA15425; Mon, 30 Jul 2012 18:31:49 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <5016A8E4.7070405@FreeBSD.org> Date: Mon, 30 Jul 2012 18:31:48 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120625 Thunderbird/13.0.1 MIME-Version: 1.0 To: attilio@FreeBSD.org References: <201207301350.q6UDobCI099069@svn.freebsd.org> <20120730143943.GY2676@deviant.kiev.zoral.com.ua> <5016A21B.6090409@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , Davide Italiano , svn-src-projects@FreeBSD.org, src-committers@FreeBSD.org 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: Mon, 30 Jul 2012 15:31:51 -0000 on 30/07/2012 18:04 Attilio Rao said the following: > On 7/30/12, Andriy Gapon wrote: >> on 30/07/2012 17:56 Attilio Rao said the following: >>> More explicitly, I think such combination TDP_NOSLEEPING + >>> TDP_NOBLOCKING (name invented) should be set on entering the interrupt >>> context, not only related to this part of callouts. This would be a >>> very good help for catching buggy situations. >> >> Something very tangential. I think it would also be nice to check if a >> thread has >> any(?) locks held when returning to userland. > > This happens already for INVARIANTS case, with td_locks counters. > In the !INVARIANTS case, this doesn't happen because you don't want to > add the burden to bump td_locks for the fast case and I think it is a > good approach. Ah, I missed that, thank you. BTW, it seems that td_locks is checked twice in normal syscallret() path: once in syscallret() itself and then in userret(). On this note, would it make sense to move the whole nine yards of asserts from syscallret() to userret()? I mean it might make sense to have those checks (td_critnest, td_pflags) in other paths to userland. -- Andriy Gapon