>> On Mon, 07 Aug 2006 21:54:24 -0400, Jim Gettys <[EMAIL PROTECTED]> said:
> The measurement that is interesting is when the kernel is executing
> off of the internal flash, and nothing plugged into USB. I'd like
> to have two numbers: with and without the USB stack loaded (I know,
> it will be painful to get the second number until the PS/2
> interface is easy to use).
I think I have a setup able to measure the second number (using a
ramdisk), but the results are still poor so far. I:
* put busybox in the developer image initrd
* told the initrd to run a busybox shell instead of switchrooting
* wrote a simple program (timestamp) to output the result of
gettimeofday(2), and put it in the initrd.
* booted my initrd from usb, with a serial console, then unplugged
the usb stick and hub.
* rmmod until no modules loaded (which included usb_storage,
ehci-hcd, uhci-hcd, scsi_mod, sd_mod, ext3, jbd)
* set an alarm, and echo -n "mem" > /sys/power/state && timestamp
The resulting serial console log file is attached, with the timestamp
output as the last line. It still takes 19 seconds from the board
drawing full power again to my userspace code running; this time we at
least have kernel BUG()s to go on, though.
Anyone have advice on how to proceed, especially with regards to the
BUG()s? I plan to build AMD_IDE (amd74xx.c) as a module rather than
compiled in, so that I can unload that too, and add CONFIG_PRINTK_TIME
in case it shows that a particular driver's resume path is responsible.
I'll be able to do those tomorrow.
- Chris.
# busybox lsmod
Module Size Used by Not tainted
# busybox date
Wed Aug 9 14:15:50 UTC 2006
# busybox echo -n "2006-08-09 14:18:00" > /proc/acpi/alarm
# busybox echo -n "mem" > /sys/power/state && timestamp
PM: Preparing system for mem sleep
Freezing cpus ...
Stopping tasks: =======|
platform i8042: suspend
serial8250 serial8250: suspend
vesafb vesafb.0: suspend
platform pcspkr: suspend
pnp 00:04: suspend
pnp 00:03: suspend
pnp 00:02: suspend
pnp 00:01: suspend
pnp 00:00: suspend
pci 0000:00:0f.5: suspend
pci 0000:00:0f.4: suspend
pci 0000:00:0f.3: suspend
AMD_IDE 0000:00:0f.2: suspend
pci 0000:00:0f.0: suspend
pci 0000:00:01.1: suspend
pci 0000:00:01.0: suspend
acpi acpi: suspend
PM: Entering mem sleep
Back to C!
BUG: sleeping function called from invalid context at include/asm/semaphore.h:99
in_atomic():0, irqs_disabled():1
[<c04051ee>] show_trace_log_lvl+0x58/0x159
[<c0405802>] show_trace+0xd/0x10
[<c040591b>] dump_stack+0x19/0x1b
[<c041de7f>] __might_sleep+0x8d/0x95
[<c05038ec>] acpi_os_wait_semaphore+0x55/0xb2
[<c05197a6>] acpi_ut_acquire_mutex+0x39/0x77
[<c0511c45>] acpi_ns_get_node+0x42/0x84
[<c0511588>] acpi_ns_evaluate+0x2c/0xf4
[<c0515402>] acpi_rs_set_srs_method_data+0xc3/0xde
[<c0514d55>] acpi_set_current_resources+0x2e/0x39
[<c051cd9f>] acpi_pci_link_set+0xfb/0x1a1
[<c051ce90>] irqrouter_resume+0x4b/0x62
[<c054bcd6>] __sysdev_resume+0x14/0x57
[<c054be4e>] sysdev_resume+0x19/0x4b
[<c055049a>] device_power_up+0x8/0xf
[<c0443e17>] suspend_enter+0x3f/0x5e
[<c0443f93>] enter_state+0x15d/0x1c3
[<c044407f>] state_store+0x86/0x9c
[<c04a8eb0>] subsys_attr_store+0x20/0x25
[<c04a8fb4>] sysfs_write_file+0xab/0xd1
[<c0472297>] vfs_write+0xab/0x157
[<c04728dc>] sys_write+0x3b/0x60
[<c0403faf>] syscall_call+0x7/0xb
DWARF2 unwinder stuck at syscall_call+0x7/0xb
Leftover inexact backtrace:
[<c0405802>] show_trace+0xd/0x10
[<c040591b>] dump_stack+0x19/0x1b
[<c041de7f>] __might_sleep+0x8d/0x95
[<c05038ec>] acpi_os_wait_semaphore+0x55/0xb2
[<c05197a6>] acpi_ut_acquire_mutex+0x39/0x77
[<c0511c45>] acpi_ns_get_node+0x42/0x84
[<c0511588>] acpi_ns_evaluate+0x2c/0xf4
[<c0515402>] acpi_rs_set_srs_method_data+0xc3/0xde
[<c0514d55>] acpi_set_current_resources+0x2e/0x39
[<c051cd9f>] acpi_pci_link_set+0xfb/0x1a1
[<c051ce90>] irqrouter_resume+0x4b/0x62
[<c054bcd6>] __sysdev_resume+0x14/0x57
[<c054be4e>] sysdev_resume+0x19/0x4b
[<c055049a>] device_power_up+0x8/0xf
[<c0443e17>] suspend_enter+0x3f/0x5e
[<c0443f93>] enter_state+0x15d/0x1c3
[<c044407f>] state_store+0x86/0x9c
[<c04a8eb0>] subsys_attr_store+0x20/0x25
[<c04a8fb4>] sysfs_write_file+0xab/0xd1
[<c0472297>] vfs_write+0xab/0x157
[<c04728dc>] sys_write+0x3b/0x60
[<c0403faf>] syscall_call+0x7/0xb
PM: Finishing wakeup.
acpi acpi: resuming
pci 0000:00:01.0: resuming
pci 0000:00:01.1: resuming
pci 0000:00:0f.0: resuming
AMD_IDE 0000:00:0f.2: resuming
pci 0000:00:0f.3: resuming
pci 0000:00:0f.4: resuming
pci 0000:00:0f.5: resuming
pnp 00:00: resuming
pnp 00:01: resuming
pnp 00:02: resuming
pnp 00:03: resuming
pnp 00:04: resuming
platform pcspkr: resuming
vesafb vesafb.0: resuming
serial8250 serial8250: resuming
platform i8042: resuming
Restarting tasks... done
Thawing cpus ...
14:18:18.985669
#
--
Chris Ball <[EMAIL PROTECTED]> <http://blog.printf.net/>
_______________________________________________
Devel mailing list
[email protected]
http://mailman.laptop.org/mailman/listinfo/devel