From owner-freebsd-current@FreeBSD.ORG Fri Jul 28 12:40:15 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A7D316A4E0 for ; Fri, 28 Jul 2006 12:40:03 +0000 (UTC) (envelope-from emaste@phaedrus.sandvine.ca) Received: from gw.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id C52A143D46 for ; Fri, 28 Jul 2006 12:40:02 +0000 (GMT) (envelope-from emaste@phaedrus.sandvine.ca) Received: from mailserver.sandvine.com ([192.168.1.10]) by gw.sandvine.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 28 Jul 2006 08:40:01 -0400 Received: from labgw2.phaedrus.sandvine.com ([192.168.3.11]) by mailserver.sandvine.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 28 Jul 2006 08:40:01 -0400 Received: by labgw2.phaedrus.sandvine.com (Postfix, from userid 12627) id 0FD65115DF; Fri, 28 Jul 2006 08:40:01 -0400 (EDT) Date: Fri, 28 Jul 2006 08:40:00 -0400 From: Ed Maste To: Olivier Warin Message-ID: <20060728124000.GA58825@sandvine.com> References: <05BA8FC7-820D-44FB-B0F9-940AA8BCBDA4@xview.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <05BA8FC7-820D-44FB-B0F9-940AA8BCBDA4@xview.net> User-Agent: Mutt/1.4.2.1i X-OriginalArrivalTime: 28 Jul 2006 12:40:01.0262 (UTC) FILETIME=[F14DA0E0:01C6B242] Cc: freebsd-current@freebsd.org Subject: Re: KTR_SCHED broken ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 12:40:15 -0000 On Thu, Jul 27, 2006 at 11:22:56PM +0200, Olivier Warin wrote: > [FROM MY KERNCONF] > options KTR > options ALQ > options KTR_ALQ > options KTR_ENTRIES=32768 > options KTR_COMPILE=KTR_SCHED > options KTR_MASK=KTR_SCHED > [EOF] > > While KTR_INTR works, it seems that KTR_SCHED does not or maybee > there is a magic sause ? It seems that KTR_SCHED doesn't work with KTR_ALQ. With that combination ktr_tracepoint() requires that td->td_critnest == 0, which won't be true in the code paths that use KTR_SCHED. For now your best bet is probably to use KTR without ALQ, but of course you're limited to a fixed number of entries. I've thought about adding to ktrdump the ability to loop on reading the ring buffer, so that it would be possible to read an arbitrarily long sequence of KTR events without ALQ. It's quite easy to implement, but I haven't yet tried it out. - Ed Maste