From owner-freebsd-usb@FreeBSD.ORG Sun Aug 9 17:38:51 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECF591065672 for ; Sun, 9 Aug 2009 17:38:51 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 75CE18FC0A for ; Sun, 9 Aug 2009 17:38:51 +0000 (UTC) Received: by fxm24 with SMTP id 24so2779388fxm.36 for ; Sun, 09 Aug 2009 10:38:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=ibpYVkxNIIK3mGj6QMlgsxfPlhSNq9Xgwx65JQ9L7TI=; b=bCBxFWfH48/a8wK3uEbufr0Fyi1BNF2J73cXAKWxUJgD4EX+QoqUu8Mba0HpPK/fxd UyUcvaSuETp9wyz6WVEgEnhmzISKDdTEZ/N7w4Llc+stZBsz26FKn4YwV56zAvZ/yiX/ R6Uehwwe5b1lgD69S5l/mN4oWk4slpstlg854= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=MfgZZ3G1otm86Yru3XsUtnrFDrM5u36pSIxtghz4+WWZiGR4mjKM5c1MsVxXSCWCSR 1xJGmJ8oye/34Obi74d6BcckWaHZpyPclvAHg++ae8oFzDqOQ17WXvwIK84hCSaz68Zv qcRbKwb+s6vHVFg4iWrmTH8UD3uO4MpxL6zDI= MIME-Version: 1.0 Sender: asmrookie@gmail.com Received: by 10.223.112.77 with SMTP id v13mr271831fap.107.1249839530364; Sun, 09 Aug 2009 10:38:50 -0700 (PDT) In-Reply-To: <3bbf2fe10908091025t7f8d00dbw5b0589728cf400ad@mail.gmail.com> References: <20090809.102341.2106235641.imp@bsdimp.com> <200908091840.55000.hselasky@c2i.net> <20090809.105507.-646227496.imp@bsdimp.com> <3bbf2fe10908091025t7f8d00dbw5b0589728cf400ad@mail.gmail.com> Date: Sun, 9 Aug 2009 19:38:50 +0200 X-Google-Sender-Auth: adb884f57ee654b7 Message-ID: <3bbf2fe10908091038m3efb3612l2923d8b3238e111f@mail.gmail.com> From: Attilio Rao To: "M. Warner Losh" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org Subject: Re: Performance issues X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Aug 2009 17:38:52 -0000 2009/8/9 Attilio Rao : > 2009/8/9 M. Warner Losh : >> In message: <200908091840.55000.hselasky@c2i.net> >> Hans Petter Selasky writes: >> : On Sunday 09 August 2009 18:23:41 M. Warner Losh wrote: >> : > Any ideas how to track this down? >> : >> : Hi, >> : >> : USB is only draining from "usbd_transfer_drain()" in >> : /sys/dev/usb/usb_transfer.c . You could add a print including the backtrace >> : and see if that function gets called when it freezes. >> >> Ummm. No. Adding a traceback print to a function that's called 60 >> times a second in steady state doesn't seem like a viable option. >> >> : Else I would try to compile a fresh kernel from USB P4. There are >> : some patches there in relation to the recent newbus lock change, >> : that might help. >> >> This kernel predates the newbus lock change. >> >> : USB uses uppercase "WDRAIN". Is your printout lowercase "wdrain" ? >> >> Yes. > > That's used by the buffer cache in order to reduce pressure of > asynchronous writes. It waits for other writes to complete before to > go on. Probabilly, I/O requests get stuck for another reasong starving > the asynchronous requests queue flushing. It would be also interesting to understand if the allowed requests are just lost or still pending and can be effectively flushed out. Can you please show the content of vm.runningbufspace ? However, keep in mind that as long as the buffer cache is global, if the bluethoot dongle breaks I/O requests, it can be the offending part, so USB may not be involved. Attilio -- Peace can only be achieved by understanding - A. Einstein