Re: high system load when using i915kms

2013-03-14 Thread Max Brazhnikov
On Tue, 12 Mar 2013 19:57:30 +0200 Konstantin Belousov wrote:
 On Tue, Mar 12, 2013 at 04:53:25PM +, Max Brazhnikov wrote:
  On Fri, 08 Mar 2013 11:38:13 -0800 Kevin Oberman wrote:
   On Fri, Mar 8, 2013 at 10:03 AM, Max Brazhnikov m...@freebsd.org wrote:
  PID USERNAME THR PRI NICE   SIZERES STATE   C   TIME   WCPU
COMMAND
   11 root   2 155 ki31 0K32K RUN 1   4:16 120.35% 
  idle
   12 root  18 -84- 0K   288K WAIT0   0:57 76.34% 
intr
   
I've got this after second boot today, although I couldn't reproduce it
yesterday even after ten attempts. But sometimes it's quite nasty and I
have
to reboot the system several times to get rid of it.
   
Max
   
   
   So the issue is that that the interrupts from one or another of the USB
   devices has exploded from near zero to around 40K when the kernel module 
   is
   loaded?
  
  Exactly.
  
   A couple of possibly irrelevant questions. Do you normally manually load
   the module? I did not research the issue, but when I manually load the
   module I was seeing things just grind to a halt. If I started Gnome, the
   module was loaded automatically by X, and things worked.
  
  No I don't usually load it manually, I was just wondering what causes the 
  interrupt storm.
  
   Why loading the Intel KMS module would cause a massive increase in
   interrupts on a USB interface completely baffles me, but I suspect some
   sort of race is going on when the module is pre-loaded.
  
  It happens if I allow X to load the module also, the problem is not due to 
  pre-loading.
 
 As I said earlier, change in the userspace cannot change the interrupt
 routing. What could happen (with very low probability) is that some
 kind of display interrupt get aliased to the non-msi one. Since it is
 unacknowledged, it causes the storm on the legacy irq line. But I never
 saw this on G[M]4*.
 
 Just as the blind shot, try to set hw.drm.msi=0 in the loader.conf
 or using the kenv, before the i915kms module is loaded.

Nice shot, it does make the difference! I've never seen the problem after
adding hw.drm.msi=0 to the loader.conf.

Max
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: high system load when using i915kms

2013-03-12 Thread Max Brazhnikov
On Fri, 08 Mar 2013 11:38:13 -0800 Kevin Oberman wrote:
 On Fri, Mar 8, 2013 at 10:03 AM, Max Brazhnikov m...@freebsd.org wrote:
PID USERNAME THR PRI NICE   SIZERES STATE   C   TIME   WCPU
  COMMAND
 11 root   2 155 ki31 0K32K RUN 1   4:16 120.35% 
idle
 12 root  18 -84- 0K   288K WAIT0   0:57 76.34% intr
 
  I've got this after second boot today, although I couldn't reproduce it
  yesterday even after ten attempts. But sometimes it's quite nasty and I
  have
  to reboot the system several times to get rid of it.
 
  Max
 
 
 So the issue is that that the interrupts from one or another of the USB
 devices has exploded from near zero to around 40K when the kernel module is
 loaded?

Exactly.

 A couple of possibly irrelevant questions. Do you normally manually load
 the module? I did not research the issue, but when I manually load the
 module I was seeing things just grind to a halt. If I started Gnome, the
 module was loaded automatically by X, and things worked.

No I don't usually load it manually, I was just wondering what causes the 
interrupt storm.

 Why loading the Intel KMS module would cause a massive increase in
 interrupts on a USB interface completely baffles me, but I suspect some
 sort of race is going on when the module is pre-loaded.

It happens if I allow X to load the module also, the problem is not due to 
pre-loading.

Max
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: high system load when using i915kms

2013-03-12 Thread Konstantin Belousov
On Tue, Mar 12, 2013 at 04:53:25PM +, Max Brazhnikov wrote:
 On Fri, 08 Mar 2013 11:38:13 -0800 Kevin Oberman wrote:
  On Fri, Mar 8, 2013 at 10:03 AM, Max Brazhnikov m...@freebsd.org wrote:
 PID USERNAME THR PRI NICE   SIZERES STATE   C   TIME   WCPU
   COMMAND
  11 root   2 155 ki31 0K32K RUN 1   4:16 120.35% 
 idle
  12 root  18 -84- 0K   288K WAIT0   0:57 76.34% intr
  
   I've got this after second boot today, although I couldn't reproduce it
   yesterday even after ten attempts. But sometimes it's quite nasty and I
   have
   to reboot the system several times to get rid of it.
  
   Max
  
  
  So the issue is that that the interrupts from one or another of the USB
  devices has exploded from near zero to around 40K when the kernel module is
  loaded?
 
 Exactly.
 
  A couple of possibly irrelevant questions. Do you normally manually load
  the module? I did not research the issue, but when I manually load the
  module I was seeing things just grind to a halt. If I started Gnome, the
  module was loaded automatically by X, and things worked.
 
 No I don't usually load it manually, I was just wondering what causes the 
 interrupt storm.
 
  Why loading the Intel KMS module would cause a massive increase in
  interrupts on a USB interface completely baffles me, but I suspect some
  sort of race is going on when the module is pre-loaded.
 
 It happens if I allow X to load the module also, the problem is not due to 
 pre-loading.

As I said earlier, change in the userspace cannot change the interrupt
routing. What could happen (with very low probability) is that some
kind of display interrupt get aliased to the non-msi one. Since it is
unacknowledged, it causes the storm on the legacy irq line. But I never
saw this on G[M]4*.

Just as the blind shot, try to set hw.drm.msi=0 in the loader.conf
or using the kenv, before the i915kms module is loaded.


pgpfLAkdIvcYS.pgp
Description: PGP signature


Re: high system load when using i915kms

2013-03-08 Thread Max Brazhnikov
On Thu, 07 Mar 2013 16:47:23 +0200 Konstantin Belousov wrote:
 On Wed, Mar 06, 2013 at 10:56:52AM +, Max Brazhnikov wrote:
  On Wed, 6 Mar 2013 08:15:37 +0200 Konstantin Belousov wrote:
   On Tue, Mar 05, 2013 at 12:24:51PM +, Max Brazhnikov wrote:
Hi,

I've switched recently to new xorg and kms driver. Sometimes after 
booting 
  my
system (9.1-STABLE #0 r245741 amd64) shows high load:

interrupt  total   rate
irq1: atkbd0 612  0
irq9: acpi0 3693  1
irq12: psm0 7512  2
irq16: uhci0 uhci3 377172955 144069
irq20: hpet0 2923357   1116
irq23: uhci1 ehci1 47432 18
irq256: hdac0  80799 30
irq257: alc0   78474 29
irq258: iwn0   19994  7
irq259: ahci0 100016 38
irq260: vgapci031250 11
Total  380466094 145327

I've never seen this with old xorg. The problem is not always 
  reproducible, 
but it's enough just to load i915kms module without staring X to 
trigger 
  it.

Any idea?
   
   So what is the complain ? Do you meaning that loading i915kms causes
   the spike in the interrupt rate on the irq16 line ?
  
  I suspect it since the only change was update to newer xorg.
 Do you mean that the same kernel was kept,
 and only usermode components upgraded ?

Correct. The kernel and world were built from r245741 more  than month ago.
I used prebuilt Xorg packages from latest experimental ports, so the changes 
in the system are minimal.

  This is plain impossible to cause the effect you described.
  
   What is the graphics part and the south bridge you are using ? Show
   the pciconf -lvc output.
  
  http://people.freebsd.org/~makc/pciconf.output
 
 I have exactly the same GM45 chipset in my laptop.
 
 BTW, is the vmstat output you demonstrated in the first message, was for
 the system with running X ? I am asking about the presence of the rendering
 activity on the display, which would explain the significant count of
 the interrupts from GPU.

Yes, it was under KDE session, however the problem can be observe with plain X 
and xterm or even without them:
# cat test.sh 
#!/bin/sh
vmstat -i
kldload i915kms
sleep 10
vmstat -i
xinit 
sleep 10
vmstat -i

interrupt  total   rate
irq1: atkbd0 169  3
irq9: acpi0   72  1
irq12: psm0   24  0
irq16: uhci0 uhci325  0
irq19: ehci0 uhci2 2  0
irq20: hpet0   20351407
irq23: uhci1 ehci195  1
irq256: hdac0 71  1
irq257: alc0 347  6
irq258: iwn01624 32
irq259: ahci0   4095 81
Total  26875537
interrupt  total   rate
irq1: atkbd0 169  2
irq9: acpi0   72  1
irq12: psm0   24  0
irq16: uhci0 uhci3   1533470  24733
irq19: ehci0 uhci2 2  0
irq20: hpet0   33165534
irq23: uhci1 ehci195  1
irq256: hdac0 71  1
irq257: alc0 509  8
irq258: iwn02090 33
irq259: ahci0   4273 68
irq260: vgapci01  0
Total1573941  25386
interrupt  total   rate
irq1: atkbd0 187  2
irq9: acpi0   94  1
irq12: psm0   24  0
irq16: uhci0 uhci3   3056916  42457
irq19: ehci0 uhci2 2  0
irq20: hpet0   44423616
irq23: uhci1 ehci195  1
irq256: hdac0 71  0
irq257: alc0 634  8
irq258: iwn02494 34
irq259: ahci0   4772 66
irq260: vgapci0   10  0
Total3109722  43190

  PID USERNAME THR PRI NICE   SIZERES STATE   C   TIME   WCPU COMMAND
   11 root   2 155 ki31 0K32K RUN 1   4:16 120.35% idle
   12 root  18 -84- 0K   288K WAIT0   0:57 76.34% intr

I've got this after second boot today, although I couldn't reproduce it 
yesterday even after ten 

Re: high system load when using i915kms

2013-03-08 Thread Kevin Oberman
On Fri, Mar 8, 2013 at 10:03 AM, Max Brazhnikov m...@freebsd.org wrote:

 On Thu, 07 Mar 2013 16:47:23 +0200 Konstantin Belousov wrote:
  On Wed, Mar 06, 2013 at 10:56:52AM +, Max Brazhnikov wrote:
   On Wed, 6 Mar 2013 08:15:37 +0200 Konstantin Belousov wrote:
On Tue, Mar 05, 2013 at 12:24:51PM +, Max Brazhnikov wrote:
 Hi,

 I've switched recently to new xorg and kms driver. Sometimes after
 booting
   my
 system (9.1-STABLE #0 r245741 amd64) shows high load:

 interrupt  total   rate
 irq1: atkbd0 612  0
 irq9: acpi0 3693  1
 irq12: psm0 7512  2
 irq16: uhci0 uhci3 377172955 144069
 irq20: hpet0 2923357   1116
 irq23: uhci1 ehci1 47432 18
 irq256: hdac0  80799 30
 irq257: alc0   78474 29
 irq258: iwn0   19994  7
 irq259: ahci0 100016 38
 irq260: vgapci031250 11
 Total  380466094 145327

 I've never seen this with old xorg. The problem is not always
   reproducible,
 but it's enough just to load i915kms module without staring X to
 trigger
   it.

 Any idea?
   
So what is the complain ? Do you meaning that loading i915kms causes
the spike in the interrupt rate on the irq16 line ?
  
   I suspect it since the only change was update to newer xorg.
  Do you mean that the same kernel was kept,
  and only usermode components upgraded ?

 Correct. The kernel and world were built from r245741 more  than month ago.
 I used prebuilt Xorg packages from latest experimental ports, so the
 changes
 in the system are minimal.

   This is plain impossible to cause the effect you described.
  
What is the graphics part and the south bridge you are using ? Show
the pciconf -lvc output.
  
   http://people.freebsd.org/~makc/pciconf.output
 
  I have exactly the same GM45 chipset in my laptop.
 
  BTW, is the vmstat output you demonstrated in the first message, was for
  the system with running X ? I am asking about the presence of the
 rendering
  activity on the display, which would explain the significant count of
  the interrupts from GPU.

 Yes, it was under KDE session, however the problem can be observe with
 plain X
 and xterm or even without them:
 # cat test.sh
 #!/bin/sh
 vmstat -i
 kldload i915kms
 sleep 10
 vmstat -i
 xinit 
 sleep 10
 vmstat -i

 interrupt  total   rate
 irq1: atkbd0 169  3
 irq9: acpi0   72  1
 irq12: psm0   24  0
 irq16: uhci0 uhci325  0
 irq19: ehci0 uhci2 2  0
 irq20: hpet0   20351407
 irq23: uhci1 ehci195  1
 irq256: hdac0 71  1
 irq257: alc0 347  6
 irq258: iwn01624 32
 irq259: ahci0   4095 81
 Total  26875537
 interrupt  total   rate
 irq1: atkbd0 169  2
 irq9: acpi0   72  1
 irq12: psm0   24  0
 irq16: uhci0 uhci3   1533470  24733
 irq19: ehci0 uhci2 2  0
 irq20: hpet0   33165534
 irq23: uhci1 ehci195  1
 irq256: hdac0 71  1
 irq257: alc0 509  8
 irq258: iwn02090 33
 irq259: ahci0   4273 68
 irq260: vgapci01  0
 Total1573941  25386
 interrupt  total   rate
 irq1: atkbd0 187  2
 irq9: acpi0   94  1
 irq12: psm0   24  0
 irq16: uhci0 uhci3   3056916  42457
 irq19: ehci0 uhci2 2  0
 irq20: hpet0   44423616
 irq23: uhci1 ehci195  1
 irq256: hdac0 71  0
 irq257: alc0 634  8
 irq258: iwn02494 34
 irq259: ahci0   4772 66
 irq260: vgapci0   10  0
 Total3109722  43190

   PID USERNAME THR PRI NICE   SIZERES STATE   C   TIME   WCPU
 COMMAND
11 root   2 155 ki31 0K32K RUN 1   4:16 120.35% idle
12 

Re: Re: high system load when using i915kms

2013-03-07 Thread Konstantin Belousov
On Wed, Mar 06, 2013 at 10:56:52AM +, Max Brazhnikov wrote:
 On Wed, 6 Mar 2013 08:15:37 +0200 Konstantin Belousov wrote:
  On Tue, Mar 05, 2013 at 12:24:51PM +, Max Brazhnikov wrote:
   Hi,
   
   I've switched recently to new xorg and kms driver. Sometimes after 
   booting 
 my
   system (9.1-STABLE #0 r245741 amd64) shows high load:
   
   interrupt  total   rate
   irq1: atkbd0 612  0
   irq9: acpi0 3693  1
   irq12: psm0 7512  2
   irq16: uhci0 uhci3 377172955 144069
   irq20: hpet0 2923357   1116
   irq23: uhci1 ehci1 47432 18
   irq256: hdac0  80799 30
   irq257: alc0   78474 29
   irq258: iwn0   19994  7
   irq259: ahci0 100016 38
   irq260: vgapci031250 11
   Total  380466094 145327
   
   I've never seen this with old xorg. The problem is not always 
 reproducible, 
   but it's enough just to load i915kms module without staring X to trigger 
 it.
   
   Any idea?
  
  So what is the complain ? Do you meaning that loading i915kms causes
  the spike in the interrupt rate on the irq16 line ?
 
 I suspect it since the only change was update to newer xorg.
Do you mean that the same kernel was kept,
and only usermode components upgraded ?

This is plain impossible to cause the effect you described.
 
  What is the graphics part and the south bridge you are using ? Show
  the pciconf -lvc output.
 
 http://people.freebsd.org/~makc/pciconf.output

I have exactly the same GM45 chipset in my laptop.

BTW, is the vmstat output you demonstrated in the first message, was for
the system with running X ? I am asking about the presence of the rendering
activity on the display, which would explain the significant count of
the interrupts from GPU.


pgpCPq0wqZdOp.pgp
Description: PGP signature


Re: Re: high system load when using i915kms

2013-03-06 Thread Max Brazhnikov
On Wed, 6 Mar 2013 08:15:37 +0200 Konstantin Belousov wrote:
 On Tue, Mar 05, 2013 at 12:24:51PM +, Max Brazhnikov wrote:
  Hi,
  
  I've switched recently to new xorg and kms driver. Sometimes after booting 
my
  system (9.1-STABLE #0 r245741 amd64) shows high load:
  
  interrupt  total   rate
  irq1: atkbd0 612  0
  irq9: acpi0 3693  1
  irq12: psm0 7512  2
  irq16: uhci0 uhci3 377172955 144069
  irq20: hpet0 2923357   1116
  irq23: uhci1 ehci1 47432 18
  irq256: hdac0  80799 30
  irq257: alc0   78474 29
  irq258: iwn0   19994  7
  irq259: ahci0 100016 38
  irq260: vgapci031250 11
  Total  380466094 145327
  
  I've never seen this with old xorg. The problem is not always 
reproducible, 
  but it's enough just to load i915kms module without staring X to trigger 
it.
  
  Any idea?
 
 So what is the complain ? Do you meaning that loading i915kms causes
 the spike in the interrupt rate on the irq16 line ?

I suspect it since the only change was update to newer xorg.

 What is the graphics part and the south bridge you are using ? Show
 the pciconf -lvc output.

http://people.freebsd.org/~makc/pciconf.output

Max
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


high system load when using i915kms

2013-03-05 Thread Max Brazhnikov
Hi,

I've switched recently to new xorg and kms driver. Sometimes after booting my
system (9.1-STABLE #0 r245741 amd64) shows high load:

interrupt  total   rate
irq1: atkbd0 612  0
irq9: acpi0 3693  1
irq12: psm0 7512  2
irq16: uhci0 uhci3 377172955 144069
irq20: hpet0 2923357   1116
irq23: uhci1 ehci1 47432 18
irq256: hdac0  80799 30
irq257: alc0   78474 29
irq258: iwn0   19994  7
irq259: ahci0 100016 38
irq260: vgapci031250 11
Total  380466094 145327

I've never seen this with old xorg. The problem is not always reproducible, 
but it's enough just to load i915kms module without staring X to trigger it.

Any idea?

Thanks,
Max
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: high system load when using i915kms

2013-03-05 Thread Konstantin Belousov
On Tue, Mar 05, 2013 at 12:24:51PM +, Max Brazhnikov wrote:
 Hi,
 
 I've switched recently to new xorg and kms driver. Sometimes after booting my
 system (9.1-STABLE #0 r245741 amd64) shows high load:
 
 interrupt  total   rate
 irq1: atkbd0 612  0
 irq9: acpi0 3693  1
 irq12: psm0 7512  2
 irq16: uhci0 uhci3 377172955 144069
 irq20: hpet0 2923357   1116
 irq23: uhci1 ehci1 47432 18
 irq256: hdac0  80799 30
 irq257: alc0   78474 29
 irq258: iwn0   19994  7
 irq259: ahci0 100016 38
 irq260: vgapci031250 11
 Total  380466094 145327
 
 I've never seen this with old xorg. The problem is not always reproducible, 
 but it's enough just to load i915kms module without staring X to trigger it.
 
 Any idea?

So what is the complain ? Do you meaning that loading i915kms causes
the spike in the interrupt rate on the irq16 line ?

What is the graphics part and the south bridge you are using ? Show
the pciconf -lvc output.


pgpINChZYyj9H.pgp
Description: PGP signature