Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Johannes Lundberg
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

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Hans Petter Selasky
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

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Johannes Lundberg
Sending the same again, this time cc the list. On Sun, Jan 21, 2018 at 7:34 PM, Hans Petter Selasky wrote: > 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

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Johannes Lundberg
On Sun, Jan 21, 2018 at 8:35 PM, Johannes Lundberg wrote: > Sending the same again, this time cc the list. > > > On Sun, Jan 21, 2018 at 7:34 PM, Hans Petter Selasky > wrote: > >> On 01/21/18 16:41, Johannes Lundberg wrote: >> >>> Hi >>> >>> Finally I found the root to the problem that's been ha

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Hans Petter Selasky
On 01/21/18 21:45, Johannes Lundberg wrote: What does kern.eventtimer.periodic do? The sysctl description wasn't that elaborate... It turns off re-programming the timer every time there is a new callout with earlier completion time. --HPS ___ free

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Ian Lepore
On Sun, 2018-01-21 at 22:07 +0100, Hans Petter Selasky wrote: > On 01/21/18 21:45, Johannes Lundberg wrote: > > > > What does kern.eventtimer.periodic do?  The sysctl description > > wasn't > > that elaborate... > It turns off re-programming the timer every time there is a new > callout  > with ea

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-21 Thread Johannes Lundberg
On Sun, Jan 21, 2018 at 9:22 PM, Ian Lepore wrote: > On Sun, 2018-01-21 at 22:07 +0100, Hans Petter Selasky wrote: > > On 01/21/18 21:45, Johannes Lundberg wrote: > > > > > > What does kern.eventtimer.periodic do? The sysctl description > > > wasn't > > > that elaborate... > > It turns off re-pr

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-22 Thread Hans Petter Selasky
On 01/21/18 23:57, Johannes Lundberg wrote: Thanks for the further explanation. I curious as to where the problem might be though.. It is the game's binary-only Linux executable (Unreal Engine 2.5), Linux SDL 1.2, or on the FreeBSD side? Haven't experienced anything similar with Quake3... Switchi

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-22 Thread Hans Petter Selasky
On 01/21/18 23:57, Johannes Lundberg wrote: Thanks for the further explanation. I curious as to where the problem might be though.. It is the game's binary-only Linux executable (Unreal Engine 2.5), Linux SDL 1.2, or on the FreeBSD side? Haven't experienced anything similar with Quake3... Switchi

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-22 Thread Johannes Lundberg
On Mon, Jan 22, 2018 at 8:23 AM, Hans Petter Selasky wrote: > On 01/21/18 23:57, Johannes Lundberg wrote: > >> Thanks for the further explanation. >> I curious as to where the problem might be though.. It is the game's >> binary-only Linux executable (Unreal Engine 2.5), Linux SDL 1.2, or on the

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-22 Thread Adrian Chadd
Hi Yeah the timers eventually get coalesced unless someone's asking for a ridciulously accurate timer value. So is some driver asking for hyper-accurate callout timer that isn't being coalesced? hps, is there any useful debugging to try and find callouts that are requesting stupidly accurate time

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-22 Thread blubee blubeeme
On Tue, Jan 23, 2018 at 9:48 AM, Adrian Chadd wrote: > Hi > > Yeah the timers eventually get coalesced unless someone's asking for a > ridciulously accurate timer value. > > So is some driver asking for hyper-accurate callout timer that isn't > being coalesced? hps, is there any useful debugging

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-23 Thread Johannes Lundberg
Hi all Some quick dtracing with play causing lag, vs play not causing lag (that is not hold down any key on a usb keyboard for too long). # dtrace -n 'profile-997hz /arg0/ { @[func(arg0)]=count(); }' Lag version -- snip -- linuxkpi.ko`idr_find 7

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-23 Thread blubee blubeeme
On Tue, Jan 23, 2018 at 7:27 PM, Johannes Lundberg wrote: > Hi all > > Some quick dtracing with play causing lag, vs play not causing lag (that > is not hold down any key on a usb keyboard for too long). > > > # dtrace -n 'profile-997hz /arg0/ { @[func(arg0)]=count(); }' > > Lag version > -- snip

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-23 Thread Hans Petter Selasky
On 01/23/18 12:27, Johannes Lundberg wrote: Hi all Some quick dtracing with play causing lag, vs play not causing lag (that is not hold down any key on a usb keyboard for too long). Hi, The only thing I can think about is that one or more of kb_delay1 or kb_delay2 are zero: sys/dev/usb/i

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-24 Thread Hans Petter Selasky
Hi, Can you test and review: https://reviews.freebsd.org/D14027 --HPS ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Re: Periodical interrupt storm when playing game with USB keyboard

2018-01-24 Thread Johannes Lundberg
On Wed, Jan 24, 2018 at 12:06 PM, Hans Petter Selasky wrote: > Hi, > > Can you test and review: > > https://reviews.freebsd.org/D14027 > > It seems better. Not as many lock_delays and lag but there still is some lag when holding down a key for too long. kernel`z_feed_linear_S16LE