Re: Event based scheduling and USB.

2010-10-27 Thread Hans Petter Selasky
By default USB devices are not suspended. You can use usbconfig power_save 
to enable automatic power save for all devices.

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


Re: Event based scheduling and USB.

2010-10-27 Thread Takanori Watanabe
In message 4cc732c7.50...@freebsd.org, Alexander Motin wrote:
Takanori Watanabe wrote:
 Is this behavior expected, or something wrong?
 I noticed one of usb host controller device shares HPET irq.
 When I implement interrupt filter in uhci driver, the load average
 goes to 0 as before.
 
 
 
 % vmstat -i
 interrupt  total   rate
 irq1: atkbd0 398  2
 irq9: acpi0  408  2
 irq12: psm03  0
 irq19: ehci1  37  0
 irq20: hpet0 uhci0 35970230
 irq22: ehci0   2  0
 irq256: em04  0
 irq257: ahci0   1692 10
 Total  38514246
 ===

I haven't noticed that issue and it is surely not expected for me. I
will try to reproduce it.

Most likely you should be able to avoid interrupt sharing using some
additional HPET options, described at hpet(4).

Try to disable using shared IRQ with uhci, the IRQ used by HPET become cpu: 
interrupt and certainly load average goes quite low, 
but never transit to C3 state. Using legacy route, it works quite well.

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


Re: Event based scheduling and USB.

2010-10-27 Thread Alexander Motin
Nate Lawson wrote:
 On 10/26/2010 12:57 PM, Alexander Motin wrote:
 Takanori Watanabe wrote:
 I updated my FreeBSD tree on laptop, to the current
 as of 18 Oct.2010, it works fine with CPU C3 state enabled,

 I think this is your achievement of event time scheduler,
 thanks!
 
 Ah, so mav@ implemented a tickless-scheduler? That is nice.

Not exactly. I've only made system to delay empty ticks when idle and
execute them later on wakeup in a batch. Scheduler work is still wanted.

 But when USB driver is enabled, the load average is considerablly 
 high (0.6 to 1.0) if sysctl oid kern.eventtimer.periodic is set to 0.
  Then kern.eventtimer.periodic is set to 1, the load average goes
 to 0 quickly as before, but almost never transit to C3.

 Is this behavior expected, or something wrong?
 
 The USB controller often keeps the bus mastering bit set. This keeps the
 system out of C3. The way to fix this is to implement global suspend.
 Put a device in suspend mode and then turn off power to the USB port it
 is on. Then the USB controller will stop polling the bus.

As I understand, if respective USB port is not used, USB stack should
put it into power_save mode not poll so often to deny entering C3 state.

 I noticed one of usb host controller device shares HPET irq.
 When I implement interrupt filter in uhci driver, the load average
 goes to 0 as before.


 
 % vmstat -i
 interrupt  total   rate
 irq1: atkbd0 398  2
 irq9: acpi0  408  2
 irq12: psm03  0
 irq19: ehci1  37  0
 irq20: hpet0 uhci0 35970230
 irq22: ehci0   2  0
 irq256: em04  0
 irq257: ahci0   1692 10
 Total  38514246
 ===
 I haven't noticed that issue and it is surely not expected for me. I
 will try to reproduce it.

 Most likely you should be able to avoid interrupt sharing using some
 additional HPET options, described at hpet(4).
 
 This seems silly. The whole point of APIC is to avoid clustering on a
 single interrupt but the BIOS put the timer on the USB controller irq?

HPET timer is not a regular ISA or PCI device. It allows several
different interrupt configurations. In most cases I remember, BIOS
setups interrupts 0 and 8, like for legacy_route mode. But this mode is
not really suitable as default in our case ATM due to conflict with
atrtc and attimer drivers.

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


Re: Event based scheduling and USB.

2010-10-27 Thread Alexander Motin
Takanori Watanabe wrote:
 In message 4cc732c7.50...@freebsd.org, Alexander Motin wrote:
 Most likely you should be able to avoid interrupt sharing using some
 additional HPET options, described at hpet(4).
 
 Try to disable using shared IRQ with uhci, the IRQ used by HPET become cpu: 
 interrupt and certainly load average goes quite low, 

If you mean cpuX:timer - then probably you did something wrong and
system fallen back to LAPIC timer.

 but never transit to C3 state. Using legacy route, it works quite well.

C3 state is blocked when LAPIC timer used.

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


Re: Event based scheduling and USB.

2010-10-27 Thread Alexander Leidinger
Quoting Alexander Motin m...@freebsd.org (from Tue, 26 Oct 2010  
22:57:59 +0300):



Takanori Watanabe wrote:



It's time to implement powertop for freebsd, isn't it?


Surely it is. I was even thinking about possibility to port one from
OpenSolaris, but other work distracted me. You may take it, it you wish.


For the benefit of the people which didn't see my message with the URL  
(I don't know if I was sending the URL to mav@ personally or if it  
appeared also in the lists):


http://hub.opensolaris.org/bin/view/Project+tesla/Powertop
is a DTrace-ified version of PowerTop (at the end of the page is a  
description how to get the source).


And for those which like plots of the values:
http://hub.opensolaris.org/bin/view/Project+tesla/ptop-gtk

Bye,
Alexander.

--
A RACF protected dataset is inaccessible.

http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org   netchild @ FreeBSD.org  : PGP ID = 72077137
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: Event based scheduling and USB.

2010-10-27 Thread Hans Petter Selasky
On Wednesday 27 October 2010 10:14:18 Alexander Motin wrote:
 As I understand, if respective USB port is not used, USB stack should
 put it into power_save mode not poll so often to deny entering C3 state.

USB will stop the hardware from polling RAM, but still a 4 second root HUB 
software timer/watchdog will be running.

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


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread Damian S . Kołodziejczyk
The following reply was made to PR bin/151616; it has been noted by GNATS.

From: =?ISO-8859-2?Q?Damian_S=2E_Ko=B3odziejczyk?= dam...@gmail.com
To: bug-follo...@freebsd.org
Cc:  
Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
Date: Wed, 27 Oct 2010 10:51:36 +0200

 2010/10/21 John Baldwin j...@freebsd.org:
  Can you get capture the messages before the panic, ideally from a verbose
  boot? =A0If you can compile a kernel with DDB and get a stack trace that =
 would
  also be very helpful. =A0You can use a digital camera if you can't hook u=
 p a
  serial console (and don't want to write the messages down by hand).
 
 
 Here is photo from 9-CURRENT (201010):
 
 http://img839.imageshack.us/i/zdjcie01h.jpg/
 http://img301.imageshack.us/i/zdjcie02c.jpg/
 http://img840.imageshack.us/i/zdjcie03.jpg/
 
 --=20
 Damian
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread Andriy Gapon
The following reply was made to PR bin/151616; it has been noted by GNATS.

From: Andriy Gapon a...@icyb.net.ua
To: =?UTF-8?B?IkRhbWlhbiBTLiBLb8WCb2R6aWVqY3p5ayI=?= dam...@gmail.com
Cc: bug-follo...@freebsd.org
Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
Date: Wed, 27 Oct 2010 13:16:58 +0300

 on 27/10/2010 12:20 Damian S. Kołodziejczyk said the following:
   Here is photo from 9-CURRENT (201010):
   
   http://img839.imageshack.us/i/zdjcie01h.jpg/
 
 Thanks a lot!
 But this wasn't a verbose boot, was it?
 
 -- 
 Andriy Gapon
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread Damian S . Kołodziejczyk
The following reply was made to PR bin/151616; it has been noted by GNATS.

From: =?ISO-8859-2?Q?Damian_S=2E_Ko=B3odziejczyk?= dam...@gmail.com
To: bug-follo...@freebsd.org, dam...@gmail.com
Cc:  
Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
Date: Wed, 27 Oct 2010 12:38:13 +0200

 W dniu 27 pa=BCdziernika 2010 12:16 u=BFytkownik Andriy Gapon
 a...@icyb.net.ua napisa=B3:
  Thanks a lot!
  But this wasn't a verbose boot, was it?
 
 
 Here is verbose boot:
 http://img43.imageshack.us/img43/225/zdjcie030g.jpg
 
 Sorry for the quality, this camera phone.
 --=20
 Damian
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread Andriy Gapon
The following reply was made to PR bin/151616; it has been noted by GNATS.

From: Andriy Gapon a...@icyb.net.ua
To: =?UTF-8?B?IkRhbWlhbiBTLiBLb8WCb2R6aWVqY3p5ayI=?= dam...@gmail.com
Cc: bug-follo...@freebsd.org
Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
Date: Wed, 27 Oct 2010 14:10:52 +0300

 on 27/10/2010 13:40 Damian S. Kołodziejczyk said the following:
   Here is verbose boot:
   http://img43.imageshack.us/img43/225/zdjcie030g.jpg
 
 Would it be possible to scroll up and take the pictures of all the messages 
since
 the start of boot ?
 Thank you.
 
   Sorry for the quality, this camera phone.
 
 It's actually OK.
 
 -- 
 Andriy Gapon
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread Damian S . Kołodziejczyk
The following reply was made to PR bin/151616; it has been noted by GNATS.

From: =?ISO-8859-2?Q?Damian_S=2E_Ko=B3odziejczyk?= dam...@gmail.com
To: bug-follo...@freebsd.org, dam...@gmail.com
Cc:  
Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
Date: Wed, 27 Oct 2010 13:42:30 +0200

 W dniu 27 pa=BCdziernika 2010 13:10 u=BFytkownik Andriy Gapon
 a...@icyb.net.ua napisa=B3:
  Would it be possible to scroll up and take the pictures of all the messag=
 es since
  the start of boot ?
 
 No problem:
 http://img28.imageshack.us/i/zdjcie031i.jpg/
 http://img839.imageshack.us/i/zdjcie032b.jpg/
 http://img163.imageshack.us/i/zdjcie033e.jpg/
 http://img185.imageshack.us/i/zdjcie034l.jpg/
 
 Next one is http://img43.imageshack.us/img43/225/zdjcie030g.jpg
 
 --=20
 Damian
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to freebsd-acpi-unsubscr...@freebsd.org


Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.

2010-10-27 Thread John Baldwin
On Wednesday, October 27, 2010 7:20:07 am Andriy Gapon wrote:
 The following reply was made to PR bin/151616; it has been noted by GNATS.
 
 From: Andriy Gapon a...@icyb.net.ua
 To: =?UTF-8?B?IkRhbWlhbiBTLiBLb8WCb2R6aWVqY3p5ayI=?= dam...@gmail.com
 Cc: bug-follo...@freebsd.org
 Subject: Re: bin/151616: [acpi]: FreeBSD 8 panic on boot.
 Date: Wed, 27 Oct 2010 14:10:52 +0300
 
  on 27/10/2010 13:40 Damian S. Kołodziejczyk said the following:
Here is verbose boot:
http://img43.imageshack.us/img43/225/zdjcie030g.jpg
  
  Would it be possible to scroll up and take the pictures of all the messages 
 since
  the start of boot ?
  Thank you.

Actually, it seems that apic_alloc_vector() is what is failing.  Can you do
'show apic' in DDB and capture that output via your camera?

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


Re: Event based scheduling and USB.

2010-10-27 Thread Takanori Watanabe
In message 4cc7db2a.2090...@freebsd.org, Alexander Motin wrote:
Takanori Watanabe wrote:
 In message 4cc732c7.50...@freebsd.org, Alexander Motin wrote:
 Most likely you should be able to avoid interrupt sharing using some
 additional HPET options, described at hpet(4).
 
 Try to disable using shared IRQ with uhci, the IRQ used by HPET become cpu: 
 interrupt and certainly load average goes quite low, 

If you mean cpuX:timer - then probably you did something wrong and
system fallen back to LAPIC timer.

Hmm, I restrict the HPET IRQ by setting hint.hpet.X.allowed_irqs
kenv value to 0xff00 to avoid using shared IRQ (IRQ20).


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