From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 21 00:50:13 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 9E3241065726; Sat, 21 Apr 2012 00:50:13 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D54538FC1E; Sat, 21 Apr 2012 00:50:07 +0000 (UTC) Received: by vcmm1 with SMTP id m1so9451669vcm.13 for ; Fri, 20 Apr 2012 17:50:07 -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 :content-transfer-encoding; bh=HwoTQmt2xZGx2bbCgYslpUzJLV4IruOEUhMLvttBSqQ=; b=LLzHZ6YQzMQmVWxz3FfcCxdHXadVTQr2+ny7Pat1h8+n8dYl4jMMa+NFQ8X8RnvtYj rjfJmtGCuIOCgw3IKB7JyzpgBDNSR4IA0rl0+2S40PGTTyQcdFjD1cRwfmCrh+T2kBeX HFriUQWwI9dg/HfVaoRo36OxIDEm7vpsLWkqni+PG9E/KA0kjzOdUX2+ckhLtRGu2yC9 QZAy7Bu5kE+5gfs5S++Xf9rT22AzvFZBHAKj8HSmZVsmr1JbKyERGs5clwWjZ6h8zIxR flpeCt0frJmi7tC4+fNMJZX9ewpS+xk8N54k+42wT9DS7DP+381o2Tf3GjZAJMmBgF4M AYng== MIME-Version: 1.0 Received: by 10.220.152.205 with SMTP id h13mr7274524vcw.12.1334969407189; Fri, 20 Apr 2012 17:50:07 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.220.38.72 with HTTP; Fri, 20 Apr 2012 17:50:07 -0700 (PDT) In-Reply-To: References: Date: Sat, 21 Apr 2012 01:50:07 +0100 X-Google-Sender-Auth: dO88HP27lLp6obnohaDnF_n9ehs Message-ID: From: Attilio Rao To: Arnaud Lacombe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , FreeBSD Current Subject: Re: Disabling an arbitrary device 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: Sat, 21 Apr 2012 00:50:13 -0000 Il 20 aprile 2012 19:18, Arnaud Lacombe ha scritto: > Hi, > > On Fri, Apr 20, 2012 at 2:16 PM, Arnaud Lacombe wrot= e: >> 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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0total =C2=A0 =C2=A0 =C2=A0 rate >> irq4: sio0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01328 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02 >> irq19: uhci1+ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 63514509 =C2=A0 =C2=A0 =C2=A096380 >> [...] >> >> generating useless load on one CPU: >> >> # top -SH >> last pid: =C2=A05223; =C2=A0load averages: =C2=A00.00, =C2=A00.00, =C2= =A00.00 =C2=A0 =C2=A0up 0+00:17:21 =C2=A013:10:35 >> 117 processes: 14 running, 79 sleeping, 24 waiting >> CPU: =C2=A00.2% user, =C2=A00.0% nice, =C2=A00.2% system, =C2=A06.6% int= errupt, 93.0% idle >> Mem: 33M Active, 9348K Inact, 67M Wired, 400K Cache, 29M Buf, 2892M Free >> [...] >> =C2=A0 57 root =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0-64 =C2=A0 =C2=A0- =C2= =A0 =C2=A0 0K =C2=A0 =C2=A0 8K CPU0 =C2=A0 0 =C2=A011:59 86.57% irq19: uhci= 1+ >> >> 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/30786d09b0cb441890cdc749ee5243= 238e81d2d8 I think a generalized kludge should really belong to device_probe_child() rather than device_add_child_ordered(). When you have a tested patch against -CURRENT, can you please send to freebsd-newbus@? 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? Thanks, Attilio --=20 Peace can only be achieved by understanding - A. Einstein