From owner-freebsd-arm@freebsd.org Fri Aug 28 12:27:53 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C41599C4983 for ; Fri, 28 Aug 2015 12:27:53 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88CACFCF for ; Fri, 28 Aug 2015 12:27:53 +0000 (UTC) (envelope-from onwahe@gmail.com) Received: by igbuu8 with SMTP id uu8so6356457igb.0 for ; Fri, 28 Aug 2015 05:27:52 -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; bh=i+JR9McRe+k3oD5h5d30Hvh8RbQji42ftm+Cq0uYP28=; b=VBYKEMKRSWcA9G8llBdm/3LsKfzyU9hq2PtLWgNA7WHHNaI4D6B68aiIts8CKjNRC8 eG3g4Qa7jAZWEkEHaG9n01R935YYJUcYDC7fx7JHrxiQDxoUDaSwW9InUkP6wuwMnt3Y Ded/SLkjUX3tuhICWB53JGUAKbFBAcUSalQ92XopP7wJ4KQkC0dgsaH1Seqi+IdsyOG0 RgeyPQDk7jvgyF8J4cXBibiPCatuveYGOV8WO1q3BbgPrZKZC5r/uFyv6OFOQhswJE5H VZ2IlhXajQI1en6Xk7YRbDuqg774leClV+CFYXvRZOVpQQQPVad7uWR6Yi8ahLOo3zYq JkCA== MIME-Version: 1.0 X-Received: by 10.50.50.225 with SMTP id f1mr2868645igo.19.1440764872684; Fri, 28 Aug 2015 05:27:52 -0700 (PDT) Received: by 10.64.239.196 with HTTP; Fri, 28 Aug 2015 05:27:52 -0700 (PDT) In-Reply-To: <55DD5C0A.2050401@selasky.org> References: <55A7D8CE.4020809@selasky.org> <55B23276.8090703@selasky.org> <55B73113.2020308@selasky.org> <55B8AB76.7030603@selasky.org> <55B8B297.1010008@selasky.org> <20150729154516.GH78154@funkthat.com> <55B8F5EC.2050908@selasky.org> <46ad096c958.1a82a175@mail.schwarzes.net> <55B9C3E2.5040501@selasky.org> <46ae815c7c3.447237c8@mail.schwarzes.net> <46aece00b53.3c1cdc1f@mail.schwarzes.net> <55BB2A5F.9000502@selasky.org> <46baa16c4ce.6efd29ef@mail.schwarzes.net> <55CF31A1.5080205@selasky.org> <46ce372c895.20050775@mail.schwarzes.net> <46d0a4441bb.41f6f91d@mail.schwarzes.net> <55DD5C0A.2050401@selasky.org> Date: Fri, 28 Aug 2015 14:27:52 +0200 Message-ID: Subject: Re: DWC OTG TX path optimisation for 11-current From: Svatopluk Kraus To: Hans Petter Selasky Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2015 12:27:54 -0000 On Wed, Aug 26, 2015 at 8:26 AM, Hans Petter Selasky wrote: > On 08/25/15 21:51, Andreas Schwarz wrote: >> >> On 24.08.15, Andreas Schwarz wrote: >> >>> With both kernels I was not able to reproduce the initial problem. >> >> >> By accident, today I run again into the problem (with r287086). 8( >> >> Aug 25 20:27:59 pizelot kernel: smsc0: warning: Failed to write register >> 0x114 >> Aug 25 20:45:32 pizelot kernel: smsc0: warning: Failed to read register >> 0x114 >> Aug 25 20:45:32 pizelot kernel: smsc0: warning: MII is busy >> Aug 25 20:46:08 pizelot kernel: smsc0: warning: Failed to write register >> 0x114 >> Aug 25 20:46:14 pizelot kernel: smsc0: warning: Failed to read register >> 0x114 >> Aug 25 20:46:14 pizelot kernel: smsc0: warning: MII is busy >> Aug 25 20:46:16 pizelot kernel: smsc0: warning: Failed to write register >> 0x114 >> Aug 25 20:46:46 pizelot kernel: smsc0: warning: Failed to read register >> 0x114 >> Aug 25 20:46:46 pizelot kernel: smsc0: warning: MII is busy >> [...] >> > > It might seem like some process is using all CPU on core 0, so that USB > doesn't get a chance to run. I would suggest maybe moving the DWC OTG fast > IRQ handling to core #1. Is it possible you could enter kgdb, and poke > around which fast IRQ is doing work there? > Well, I finally found a courage ;) to hack dwc_otg driver to be able to inactivate it totally after trigger is pulled. And even then, if there was no interrupt and no timer on it, the problem survived. Thus, I thing that the driver is out of game. However, some small chance remains that the driver might corrupt something in kernel. But this indirect influence is, IMO, not likely. My subjective observation is that the slow system response can be caused by slow wake up from idle state. I have tried to change scheduler from ULE to BSD one with no MII warning and everything is okay result. And buildword was about one hour faster. Note that the trigger is very sensitive, so it can be just because system timing and many other things are different with different scheduler. Another obeservation is that in the bad system state, ipi rate is 10 times less (2 - 3 per a second) than in normal state (about 20 per a second) measured when system is 99% idle. Svata