From owner-freebsd-current@FreeBSD.ORG Sat Apr 21 08:17:02 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 053FB106564A; Sat, 21 Apr 2012 08:17:02 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0568FC15; Sat, 21 Apr 2012 08:17:01 +0000 (UTC) Received: by wibhj6 with SMTP id hj6so1068020wib.13 for ; Sat, 21 Apr 2012 01:17:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=GJAKO5QezeXPY3DiraaMNXiBKNuwYMPFs7ZqExE1qj0=; b=k0zr5zO74x2NtvVBSfMyx4OnJO3+iymUV4oVGprUt1r56fAFw7xwx+tVGGWCFYHkGM xYkVKIsvf9942M0D7JDdyEOd24ym8j88ksSG30lE0TNd1HgmBwbyJWsVwc90zmT2kZgz KNIEXm4yUJsfDnEWpvEs2QBGd1GGh0cZ0qc0QZYbpuDJDE0YqNta5vhLIp79tgYeoC6s 2PEgFYcyXlju/8rRPr6eRemN9kZsyfcy3K8o4YGK1Pfd5o4J/ZHyhoppssWWtbIFw9Xj MWLkHxj4x3WzbJzv3f/ELp7YAyjFtqzIlB8ZrUhj/dloNjbb/BAT/t2btBfXwYnux+Pm o91A== MIME-Version: 1.0 Received: by 10.180.92.71 with SMTP id ck7mr4335836wib.21.1334996220182; Sat, 21 Apr 2012 01:17:00 -0700 (PDT) Received: by 10.216.49.81 with HTTP; Sat, 21 Apr 2012 01:17:00 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Apr 2012 04:17:00 -0400 Message-ID: From: Arnaud Lacombe To: Attilio Rao Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , FreeBSD Current Subject: Re: Disabling an arbitrary device 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: Sat, 21 Apr 2012 08:17:02 -0000 Hi, On Fri, Apr 20, 2012 at 8:50 PM, Attilio Rao wrote: > Il 20 aprile 2012 19:18, Arnaud Lacombe ha scritto: >> Hi, >> >> On Fri, Apr 20, 2012 at 2:16 PM, Arnaud Lacombe wro= te: >>> Hi, >>> >>> I will be bringing up an old thread there, but it would seem the >>> situation did not evolve in the past 9 years. I have a machine running >>> 7.1 whose UHCI controller is generating some interrupt storm: >>> >>> # vmstat -i >>> interrupt =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0total =A0 = =A0 =A0 rate >>> irq4: sio0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A01328 =A0 = =A0 =A0 =A0 =A02 >>> irq19: uhci1+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 63514509 =A0 =A0 =A09= 6380 >>> [...] >>> >>> generating useless load on one CPU: >>> >>> # top -SH >>> last pid: =A05223; =A0load averages: =A00.00, =A00.00, =A00.00 =A0 =A0u= p 0+00:17:21 =A013:10:35 >>> 117 processes: 14 running, 79 sleeping, 24 waiting >>> CPU: =A00.2% user, =A00.0% nice, =A00.2% system, =A06.6% interrupt, 93.= 0% idle >>> Mem: 33M Active, 9348K Inact, 67M Wired, 400K Cache, 29M Buf, 2892M Fre= e >>> [...] >>> =A0 57 root =A0 =A0 =A0 =A0 =A0-64 =A0 =A0- =A0 =A0 0K =A0 =A0 8K CPU0 = =A0 0 =A011:59 86.57% irq19: uhci1+ >>> >>> I thought I could use an hint to forbid uhci(4) attachment, ala: >>> >>> hint.uhci.0.disabled=3D"1" >>> hint.uhci.1.disabled=3D"1" >>> >>> in /boot/loader.conf. However, it would seem that what should be >>> usable with any arbitrary devices, ie. be an integral part of >>> device(9), has to be hardcoded in every driver, sad. >>> >> as for the usual "if you're not happy, please provide a patch": >> >> https://github.com/lacombar/freebsd/commit/30786d09b0cb441890cdc749ee524= 3238e81d2d8 > > I think a generalized kludge should really belong to > device_probe_child() rather than device_add_child_ordered(). > suit me. > When you have a tested patch against -CURRENT, can you please send to > freebsd-newbus@? > will give it a try, eventually. > BTW, IIRC 7.x doesn't have the new USB stack, which means that you can > have caught easilly a driver bug there, did you consider switching at > least to 8.x kernel? > That is unfortunately not a decision for me to make, though a switch to 9.x will be more likely. That said, it seems that it is not a USB specific issue, but an IRQ19's issue. I did not had a chance to investigate that further, but with uhci(4) disabled, atapci(4) is now IRQ-storming. This is a known issue relatively widely encountered, with various workarounds possible. - Arnaud