From owner-freebsd-hackers@FreeBSD.ORG Tue May 29 20:12:32 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 F3CF91065670; Tue, 29 May 2012 20:12:31 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7B07B8FC0C; Tue, 29 May 2012 20:12:31 +0000 (UTC) Received: by vcbfy7 with SMTP id fy7so2979551vcb.13 for ; Tue, 29 May 2012 13:12:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=9wx9a97tDqgm/CysCycPzTZfzi9jpmsiGC8XdoASotY=; b=IWP/iP3vIU2f/EylC+iiAKtY3GT5E2SM+58R/6U+vuymrg6MKDqsMaE7lgf8tjTTc+ Ww9SfVeADv9mSmm3fDyB0KrsDApsXubqPNXM15tK+oG8YaHJvKXUuMNVhc6LodqVUHUO 2ukYYlahJqwLiGf1zAgnc1ZX0muXFvKzhBv8OcPQCDtwOGTf2vsep/0dEEODZYxXQ7RB EWdCp1pxWhgJpK8dGKBqs7rtjRwMeh+ed25SR8ncKdPS7N/DBENjqVcHotlEUS6n+8Xn ZK4Q/lhoblabhRUfH+jqlJSL/YpLJ/UggjIymaGCrOqkv5SUQ0bThgiuMf3ygjedlMUc iQcQ== MIME-Version: 1.0 Received: by 10.220.221.7 with SMTP id ia7mr14446354vcb.31.1338322350497; Tue, 29 May 2012 13:12:30 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.99.11 with HTTP; Tue, 29 May 2012 13:12:26 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 May 2012 21:12:26 +0100 X-Google-Sender-Auth: vA7ejcEJW7BNQ27A7TIVV8TOqpI Message-ID: From: Attilio Rao To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: freebsd-hackers@freebsd.org, Alexander Motin 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: Tue, 29 May 2012 20:12:32 -0000 2012/5/29 Adrian Chadd : > Hi Alexander and others, > > I've been tinkering with ath(4) IO scheduling and taskqueues. In order > to get proper "in order" TX IO occuring, I've placed ath_start() into > a taskqueue so now whenever ath_start() is called, it just schedules a > taskqueue entry to run. > > However, performance is worse. :-) > > Here's a schedgraph trace. > > http://people.freebsd.org/~adrian/ath/ktr.4-ath-iperf-using-taskqueue-for-tx.ktr.gz > > I've thrown this through schedgraph.py on stable/9 and I've found some > rather annoying behaviour. It seems that the ath0 taskqueue stays in > the "runq add" state for quite a long time (1.5ms and longer) because > something else is going on on CPU #0. > > I'm very confused about what's going on. I'd like a hand trying to > figure out why the schedgraph output is the way it is. What I would usually do for this cases, is to patch your kernel with more KTR traces (handmade class, add a fictious KTR class after KTR_BUF) in the interested code paths to log why your task is not really scheduled. Attilio -- Peace can only be achieved by understanding - A. Einstein