From owner-freebsd-current@freebsd.org Sun Jan 21 19:37:52 2018 Return-Path: Delivered-To: freebsd-current@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 EDCFBEB6AE7 for ; Sun, 21 Jan 2018 19:37:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B54C379135 for ; Sun, 21 Jan 2018 19:37:52 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4108F2604F8; Sun, 21 Jan 2018 20:37:50 +0100 (CET) Subject: Re: Periodical interrupt storm when playing game with USB keyboard To: Johannes Lundberg , freebsd-current References: From: Hans Petter Selasky Message-ID: Date: Sun, 21 Jan 2018 20:34:59 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Sun, 21 Jan 2018 19:37:53 -0000 On 01/21/18 16:41, Johannes Lundberg wrote: > Hi > > Finally I found the root to the problem that's been having me puzzled for > the last week. > > I started playing UT2004 on my laptop while away from home. Worked > perfectly. When I'm home and connect external display+mouse/keyboard, I get > weird random lag. > > It is intr process that goes up to 100% CPU usage (swi4: clock) for a > couple of seconds every 30 seconds or so, but only when I'm moving around > in the game. To move around you need to hold down any of the wasd-keys. > > Turns out, the interrupt storms only happen when I use my external > keyboard, not with the laptop keyboard. > > The internal keyboard is: > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > > and external (Microsoft sculpt ergonomic desktop): > ugen0.2: at usbus0 > ukbd0: 2.00/7.97, addr 1> on usbus0 > > The game runs with a linux binary. 32/64bit both act the same. > It uses libSDL-1.2 from /compat/linux/lib for rendering but not sure about > input events. > > I tried lowering the key repeat rate both with xset and kbdcontrol but it > has no effect. > > I don't have any wired USB keyboard to try with. > > Anyone have a clue to what's going on? > > Hardware is Dell Latitude E7270 > with > FreeBSD 12-CURRENT > drm-next-kmod > linux-c6 Hi, What does "vmstat -i" say? The issue can also be caused by a timer with a small or zero timeout. This can be checked by setting: kern.eventtimer.periodic=1 in /boot/loader.conf and rebooting. --HPS