From owner-freebsd-hackers@FreeBSD.ORG Thu May 31 12:33:29 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EE3B106564A; Thu, 31 May 2012 12:33:29 +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 840F18FC15; Thu, 31 May 2012 12:33:27 +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 PAA01149; Thu, 31 May 2012 15:33:25 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4FC76515.10302@FreeBSD.org> Date: Thu, 31 May 2012 15:33:25 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120503 Thunderbird/12.0.1 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org References: <201205301124.52597.jhb@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.5pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , Alexander Motin , John Baldwin Subject: Re: ULE/sched issues on stable/9 - why isn't preemption occuring? 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, 31 May 2012 12:33:29 -0000 Sorry to hijack this thread, but just recently I've stumbled upon this Linux tool: http://lwn.net/Articles/353295/ perf sched latency seems to be particularly convenient and useful. The idea to track time between a point when a thread is waken up and a point when the thread actually run was quite good. I am sure that something like this could be scripted on top of ktr(4) using the trace points in the schedulers code. schedgraph is very cool, but it seems to lack some auto-analysis capabilities which would highlight the most interesting places. In this vein it might make sense to enable KTR and KTR_SCHED in GENERIC. -- Andriy Gapon