2010-12-03 01:07:40

by Andrew Morton

[permalink] [raw]
Subject: mmotm 2010-12-02-16-34 uploaded

The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to

http://userweb.kernel.org/~akpm/mmotm/

and will soon be available at

git://zen-kernel.org/kernel/mmotm.git

It contains the following patches against 2.6.37-rc4:

origin.patch
mm-hugetlbc-avoid-double-unlock_page-in-hugetlb_fault.patch
mm-mempolicyc-add-rcu-read-lock-to-protect-pid-structure.patch
vmstat-fix-dirty-threshold-ordering.patch
leds-fix-up-dependencies.patch
reiserfs-dont-acquire-lock-recursively-in-reiserfs_acl_chmod.patch
cs5535-gpio-apply-cs5536-errata-workaround-for-gpios.patch
vmalloc-eagerly-clear-ptes-on-vunmap.patch
documentation-filesystems-vfstxt-fix-repeasepage-description.patch
mem-hotplug-introduce-unlock_memory_hotplug.patch
ksm-annotate-ksm_thread_mutex-is-no-deadlock-source.patch
do_exit-make-sure-we-run-with-get_fs-==-user_ds.patch
linux-next.patch
linux-next-git-rejects.patch
next-remove-localversion.patch
i-need-old-gcc.patch
aesni-nfg.patch
arch-alpha-kernel-systblss-remove-debug-check.patch
memblock-fix-memblock_is_region_memory.patch
mm-vmap-area-cache.patch
arch-arm-plat-omap-iovmmc-fix-end-address-of-vm-area-comparation-in-alloc_iovm_area.patch
backlight-fix-88pm860x_bl-macro-collision.patch
cciss-fix-botched-tag-masking-for-scsi-tape-commands.patch
hpsa-fix-redefinition-of-pci_device_id_cissf.patch
acerhdf-add-support-for-aspire-1410-bios-v13314.patch
arch-x86-kernel-apic-io_apicc-fix-warning.patch
x86-olpc-add-xo-1-suspend-resume-support.patch
x86-olpc-add-xo-1-suspend-resume-support-fix.patch
arch-arm-mach-tegra-timerc-separate-clocksource-and-sched_clock.patch
fs-btrfs-inodec-eliminate-memory-leak.patch
btrfs-dont-dereference-extent_mapping-if-null.patch
cifs-dont-overwrite-dentry-name-in-d_revalidate.patch
cpufreq-fix-ondemand-governor-powersave_bias-execution-time-misuse.patch
drivers-dma-use-the-ccflag-y-instead-of-extra_cflags.patch
drivers-dma-ioat-use-the-ccflag-y-instead-of-extra_cflags.patch
jfs-dont-overwrite-dentry-name-in-d_revalidate.patch
debugfs-remove-module_exit.patch
drivers-gpu-drm-radeon-atomc-fix-warning.patch
irq-use-per_cpu-kstat_irqs.patch
irq-use-per_cpu-kstat_irqs-checkpatch-fixes.patch
timers-use-this_cpu_read.patch
headers_check-better-search-for-functions-in-headers.patch
headers_check-better-search-for-functions-in-headers-fix.patch
headers_check-better-search-for-functions-in-headers-fix-checkpatch-fixes.patch
drivers-leds-leds-lp5521c-fix-potential-buffer-overflow.patch
leds-route-kbd-leds-through-the-generic-leds-layer.patch
mips-enable-arch_dma_addr_t_64bit-with-highmem-64bit_phys_addr-64bit.patch
isdn-capi-unregister-capictr-notifier-after-init-failure.patch
isdn-capi-make-kcapi-use-a-separate-workqueue.patch
drivers-video-backlight-l4f00242t03c-make-1-bit-signed-field-unsigned.patch
drivers-video-backlight-l4f00242t03c-full-implement-fb-power-states-for-this-lcd.patch
drivers-video-backlight-l4f00242t03c-prevent-unbalanced-calls-to-regulator-enable-disable.patch
btusb-patch-add_apple_macbookpro62.patch
atmel_serial-fix-rts-high-after-initialization-in-rs485-mode.patch
atmel_serial-fix-rts-high-after-initialization-in-rs485-mode-fix.patch
drivers-message-fusion-mptsasc-fix-warning.patch
scsi-fix-a-header-to-include-linux-typesh.patch
drivers-block-makefile-replace-the-use-of-module-objs-with-module-y.patch
drivers-block-aoe-makefile-replace-the-use-of-module-objs-with-module-y.patch
vfs-remove-a-warning-on-open_fmode.patch
vfs-add-__fmode_exec.patch
n_hdlc-fix-read-and-write-locking.patch
n_hdlc-fix-read-and-write-locking-update.patch
mm.patch
mm-page-allocator-adjust-the-per-cpu-counter-threshold-when-memory-is-low.patch
mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds.patch
mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds-fix.patch
mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds-update.patch
mm-vmstat-use-a-single-setter-function-and-callback-for-adjusting-percpu-thresholds-fix-set_pgdat_percpu_threshold-dont-use-for_each_online_cpu.patch
writeback-integrated-background-writeback-work.patch
writeback-trace-wakeup-event-for-background-writeback.patch
writeback-stop-background-kupdate-works-from-livelocking-other-works.patch
writeback-stop-background-kupdate-works-from-livelocking-other-works-update.patch
writeback-avoid-livelocking-wb_sync_all-writeback.patch
writeback-avoid-livelocking-wb_sync_all-writeback-update.patch
writeback-check-skipped-pages-on-wb_sync_all.patch
writeback-check-skipped-pages-on-wb_sync_all-update.patch
writeback-check-skipped-pages-on-wb_sync_all-update-fix.patch
writeback-io-less-balance_dirty_pages.patch
writeback-consolidate-variable-names-in-balance_dirty_pages.patch
writeback-per-task-rate-limit-on-balance_dirty_pages.patch
writeback-per-task-rate-limit-on-balance_dirty_pages-fix.patch
writeback-prevent-duplicate-balance_dirty_pages_ratelimited-calls.patch
writeback-account-per-bdi-accumulated-written-pages.patch
writeback-bdi-write-bandwidth-estimation.patch
writeback-bdi-write-bandwidth-estimation-fix.patch
writeback-show-bdi-write-bandwidth-in-debugfs.patch
writeback-quit-throttling-when-bdi-dirty-pages-dropped-low.patch
writeback-reduce-per-bdi-dirty-threshold-ramp-up-time.patch
writeback-make-reasonable-gap-between-the-dirty-background-thresholds.patch
writeback-scale-down-max-throttle-bandwidth-on-concurrent-dirtiers.patch
writeback-add-trace-event-for-balance_dirty_pages.patch
writeback-make-nr_to_write-a-per-file-limit.patch
writeback-make-nr_to_write-a-per-file-limit-fix.patch
sync_inode_metadata-fix-comment.patch
mm-page-writebackc-fix-__set_page_dirty_no_writeback-return-value.patch
vmscan-factor-out-kswapd-sleeping-logic-from-kswapd.patch
mm-find_get_pages_contig-fixlet.patch
fs-mpagec-consolidate-code.patch
fs-mpagec-consolidate-code-checkpatch-fixes.patch
mm-convert-sprintf_symbol-to-%ps.patch
mm-smaps-export-mlock-information.patch
mm-compaction-add-trace-events-for-memory-compaction-activity.patch
mm-vmscan-convert-lumpy_mode-into-a-bitmask.patch
mm-vmscan-reclaim-order-0-and-use-compaction-instead-of-lumpy-reclaim.patch
mm-vmscan-reclaim-order-0-and-use-compaction-instead-of-lumpy-reclaim-fix.patch
mm-migration-allow-migration-to-operate-asynchronously-and-avoid-synchronous-compaction-in-the-faster-path.patch
mm-migration-allow-migration-to-operate-asynchronously-and-avoid-synchronous-compaction-in-the-faster-path-fix.patch
mm-migration-cleanup-migrate_pages-api-by-matching-types-for-offlining-and-sync.patch
mm-compaction-perform-a-faster-migration-scan-when-migrating-asynchronously.patch
mm-vmscan-rename-lumpy_mode-to-reclaim_mode.patch
mm-deactivate-invalidated-pages.patch
mm-deactivate-invalidated-pages-fix.patch
mm-remove-unused-get_vm_area_node.patch
mm-remove-gfp-mask-from-pcpu_get_vm_areas.patch
mm-unify-module_alloc-code-for-vmalloc.patch
oom-allow-a-non-cap_sys_resource-proces-to-oom_score_adj-down.patch
mm-clear-pageerror-bit-in-msync-fsync.patch
do_wp_page-remove-the-reuse-flag.patch
do_wp_page-clarify-dirty_page-handling.patch
mlock-avoid-dirtying-pages-and-triggering-writeback.patch
frv-duplicate-output_buffer-of-e03.patch
frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch
hpet-factor-timer-allocate-from-open.patch
um-mark-config_highmem-as-broken.patch
arch-um-drivers-linec-safely-iterate-over-list-of-winch-handlers.patch
kmsg_dump-constrain-mtdoops-and-ramoops-to-perform-their-actions-only-for-kmsg_dump_panic.patch
kmsg_dump-add-kmsg_dump-calls-to-the-reboot-halt-poweroff-and-emergency_restart-paths.patch
set_rtc_mmss-show-warning-message-only-once.patch
include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit.patch
include-linux-kernelh-abs-fix-handling-of-32-bit-unsigneds-on-64-bit-fix.patch
add-the-common-dma_addr_t-typedef-to-include-linux-typesh.patch
toshibah-hide-a-function-prototypes-behind-__kernel__-macro.patch
dca-remove-unneeded-null-check.patch
printk-use-rcu-to-prevent-potential-lock-contention-in-kmsg_dump.patch
scripts-get_maintainerpl-make-rolestats-the-default.patch
scripts-get_maintainerpl-use-git-fallback-more-often.patch
percpucounter-optimize-__percpu_counter_add-a-bit-through-the-use-of-this_cpu-operations.patch
drivers-mmc-host-omapc-use-resource_size.patch
drivers-mmc-host-omap_hsmmcc-use-resource_size.patch
scripts-checkpatchpl-add-check-for-multiple-terminating-semicolons-and-casts-of-vmalloc.patch
checkpatchpl-fix-cast-detection.patch
fs-select-fix-information-leak-to-userspace.patch
fs-select-fix-information-leak-to-userspace-fix.patch
epoll-convert-max_user_watches-to-long.patch
binfmt_elf-cleanups.patch
drivers-rtc-rtc-omapc-fix-a-memory-leak.patch
rtc-add-real-time-clock-driver-for-nvidia-tegra.patch
drivers-gpio-cs5535-gpioc-add-some-additional-cs5535-specific-gpio-functionality.patch
drivers-staging-olpc_dcon-convert-to-new-cs5535-gpio-api.patch
cyber2000fb-avoid-palette-corruption-at-higher-clocks.patch
jbd-remove-dependency-on-__gfp_nofail.patch
memcg-add-page_cgroup-flags-for-dirty-page-tracking.patch
memcg-document-cgroup-dirty-memory-interfaces.patch
memcg-document-cgroup-dirty-memory-interfaces-fix.patch
memcg-create-extensible-page-stat-update-routines.patch
memcg-add-lock-to-synchronize-page-accounting-and-migration.patch
memcg-fix-unit-mismatch-in-memcg-oom-limit-calculation.patch
memcg-use-zalloc-rather-than-mallocmemset.patch
fs-proc-basec-kernel-latencytopc-convert-sprintf_symbol-to-%ps.patch
fs-proc-basec-kernel-latencytopc-convert-sprintf_symbol-to-%ps-checkpatch-fixes.patch
proc-use-unsigned-long-inside-proc-statm.patch
proc-use-seq_puts-seq_putc-where-possible.patch
exec_domain-establish-a-linux32-domain-on-config_compat-systems.patch
rapidio-use-common-destid-storage-for-endpoints-and-switches.patch
rapidio-integrate-rio_switch-into-rio_dev.patch
fs-execc-provide-the-correct-process-pid-to-the-pipe-helper.patch
nfc-driver-for-nxp-semiconductors-pn544-nfc-chip.patch
nfc-driver-for-nxp-semiconductors-pn544-nfc-chip-update.patch
remove-dma64_addr_t.patch
pps-trivial-fixes.patch
pps-declare-variables-where-they-are-used-in-switch.patch
pps-fix-race-in-pps_fetch-handler.patch
pps-unify-timestamp-gathering.patch
pps-access-pps-device-by-direct-pointer.patch
pps-convert-printk-pr_-to-dev_.patch
pps-move-idr-stuff-to-ppsc.patch
pps-add-async-pps-event-handler.patch
pps-add-async-pps-event-handler-fix.patch
pps-dont-disable-interrupts-when-using-spin-locks.patch
pps-use-bug_on-for-kernel-api-safety-checks.patch
pps-simplify-conditions-a-bit.patch
ntp-add-hardpps-implementation.patch
pps-capture-monotonic_raw-timestamps-as-well.patch
pps-add-kernel-consumer-support.patch
pps-add-parallel-port-pps-client.patch
pps-add-parallel-port-pps-signal-generator.patch
memstick-a-few-changes-to-core.patch
memstick-add-support-for-legacy-memorysticks.patch
memstick-add-driver-for-ricoh-r5c592-card-reader.patch
memstick-add-driver-for-ricoh-r5c592-card-reader-fix.patch
memstick-core-fix-device_register-error-handling.patch
w1-ds2423-counter-driver-and-documentation.patch
w1-ds2423-counter-driver-and-documentation-fix.patch
cramfs-hide-function-prototypes-behind-__kernel__-macro.patch
romfs-have-romfs_fsh-pull-in-necessary-headers.patch
decompressors-add-missing-init-ie-__init.patch
decompressors-get-rid-of-set_error_fn-macro.patch
decompressors-include-linux-slabh-in-linux-decompress-mmh.patch
decompressors-remove-unused-function-from-lib-decompress_unlzmac.patch
decompressors-fix-header-validation-in-decompress_unlzmac.patch
decompressors-check-for-read-errors-in-decompress_unlzmac.patch
decompressors-check-for-write-errors-in-decompress_unlzmac.patch
decompressors-validate-match-distance-in-decompress_unlzmac.patch
decompressors-check-for-write-errors-in-decompress_unlzoc.patch
decompressors-check-input-size-in-decompress_unlzoc.patch
decompressors-fix-callback-to-callback-mode-in-decompress_unlzoc.patch
bitops-merge-little-and-big-endian-definisions-in-asm-generic-bitops-leh.patch
bitops-rename-generic-little-endian-bitops-functions.patch
s390-introduce-little-endian-bitops.patch
arm-introduce-little-endian-bitops.patch
m68k-introduce-little-endian-bitops.patch
bitops-introduce-config_generic_find_le_bit.patch
m68knommu-introduce-little-endian-bitops.patch
m68knommu-introduce-little-endian-bitops-build-fix.patch
bitops-introduce-little-endian-bitops-for-most-architectures.patch
rds-stop-including-asm-generic-bitops-leh.patch
kvm-stop-including-asm-generic-bitops-leh.patch
asm-generic-use-little-endian-bitops.patch
ext3-use-little-endian-bitops.patch
ext4-use-little-endian-bitops.patch
ocfs2-use-little-endian-bitops.patch
nilfs2-use-little-endian-bitops.patch
reiserfs-use-little-endian-bitops.patch
udf-use-little-endian-bitops.patch
ufs-use-little-endian-bitops.patch
md-use-little-endian-bit-operations.patch
dm-use-little-endian-bit-operations.patch
bitops-remove-ext2-non-atomic-bitops-from-asm-bitopsh.patch
m68k-remove-inline-asm-from-minix_find_first_zero_bit.patch
bitops-remove-minix-bitops-from-asm-bitopsh.patch
bitops-use-find_first_zero_bit-instead-of-find_next_zero_bitaddr-size-0.patch
make-sure-nobodys-leaking-resources.patch
journal_add_journal_head-debug.patch
releasing-resources-with-children.patch
make-frame_pointer-default=y.patch
mutex-subsystem-synchro-test-module.patch
mutex-subsystem-synchro-test-module-add-missing-header-file.patch
slab-leaks3-default-y.patch
put_bh-debug.patch
add-debugging-aid-for-memory-initialisation-problems.patch
workaround-for-a-pci-restoring-bug.patch
prio_tree-debugging-patch.patch
single_open-seq_release-leak-diagnostics.patch
add-a-refcount-check-in-dput.patch
getblk-handle-2tb-devices.patch
memblock-add-input-size-checking-to-memblock_find_region.patch
memblock-add-input-size-checking-to-memblock_find_region-fix.patch


2010-12-03 17:35:27

by Randy Dunlap

[permalink] [raw]
Subject: Re: mmotm 2010-12-02-16-34 uploaded (acpi_video)

On Thu, 02 Dec 2010 16:34:54 -0800 [email protected] wrote:

> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>
> http://userweb.kernel.org/~akpm/mmotm/
>
> and will soon be available at
>
> git://zen-kernel.org/kernel/mmotm.git
>
> It contains the following patches against 2.6.37-rc4:


drivers/built-in.o: In function `acpi_video_bus_put_one_device':
video.c:(.text+0x9fd9b): undefined reference to `video_output_unregister'
drivers/built-in.o: In function `acpi_video_device_find_cap':
video.c:(.text+0xa0c4d): undefined reference to `video_output_register'


kernel .config file is attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


Attachments:
config-r9476 (66.70 kB)

2010-12-03 17:38:08

by Randy Dunlap

[permalink] [raw]
Subject: Re: mmotm 2010-12-02-16-34 uploaded (netfilter-related)

On Thu, 02 Dec 2010 16:34:54 -0800 [email protected] wrote:

> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>
> http://userweb.kernel.org/~akpm/mmotm/
>
> and will soon be available at
>
> git://zen-kernel.org/kernel/mmotm.git
>
> It contains the following patches against 2.6.37-rc4:


When CONFIG_NF_CONNTRACK is not enabled:

mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack.h:94: error: field 'ct_general' has incomplete type
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack.h: In function 'nf_ct_get':
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack.h:174: error: 'const struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack.h: In function 'nf_ct_put':
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack.h:181: error: implicit declaration of function 'nf_conntrack_put'
In file included from mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack_core.h:18,
from mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:26:
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack_ecache.h: In function 'nf_ct_ecache_ext_add':
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack_ecache.h:35: error: 'struct net' has no member named 'ct'
In file included from mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:26:
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack_core.h: In function 'nf_conntrack_confirm':
mmotm-2010-1202-1634/include/net/netfilter/nf_conntrack_core.h:60: error: 'struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c: In function 'nf_ct6_defrag_user':
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:36: error: 'struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:37: error: implicit declaration of function 'nf_ct_zone'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:37: error: 'struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c: In function 'ipv6_defrag':
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:60: error: 'struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:60: error: 'struct sk_buff' has no member named 'nfct'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_conntrack_reasm.c: In function 'nf_ct_frag6_output':
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_conntrack_reasm.c:598: error: implicit declaration of function 'nf_conntrack_put_reasm'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_conntrack_reasm.c:598: error: 'struct sk_buff' has no member named 'nfct_reasm'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_conntrack_reasm.c:599: error: implicit declaration of function 'nf_conntrack_get_reasm'
mmotm-2010-1202-1634/net/ipv6/netfilter/nf_conntrack_reasm.c:600: error: 'struct sk_buff' has no member named 'nfct_reasm'


kernel .config file is attached.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***


Attachments:
config-r9490 (46.23 kB)

2010-12-03 21:43:28

by Zimny Lech

[permalink] [raw]
Subject: Re: mmotm 2010-12-02-16-34 uploaded

Ave,

2010/12/3 <[email protected]>:
> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>

23 builds, and only known problems, nothing new

arch/x86/built-in.o: In function `kvm_smp_prepare_boot_cpu':
kvm.c:(.init.text+0xdb49): undefined reference to `kvm_register_clock'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

drivers/built-in.o: In function `pch_uart_shutdown':
pch_uart.c:(.text+0x1a9921): undefined reference to `dma_release_channel'
pch_uart.c:(.text+0x1a9939): undefined reference to `dma_release_channel'
drivers/built-in.o: In function `pch_uart_startup':
pch_uart.c:(.text+0x1a9bdd): undefined reference to `__dma_request_channel'
pch_uart.c:(.text+0x1a9c3e): undefined reference to `__dma_request_channel'
pch_uart.c:(.text+0x1a9e38): undefined reference to `dma_release_channel'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

make[4]: *** No rule to make target
`drivers/scsi/aic7xxx/aicasm/*.[chyl]', needed by
`drivers/scsi/aic7xxx/aicasm/aicasm'. Stop.
make[3]: *** [drivers/scsi/aic7xxx] Error 2
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2




--
Slawa!
Zimny "Spie dziadu!" Lech z Wawelu

Piekielny strach zagrzmia?
Patrz? na sufit
Krew tam
Strz?py g??w w b?lach j?cz? co?

2010-12-04 00:39:34

by Stephen Rothwell

[permalink] [raw]
Subject: Re: mmotm 2010-12-02-16-34 uploaded

Hi Andrew,

On Thu, 02 Dec 2010 16:34:54 -0800 [email protected] wrote:
>
> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>
> http://userweb.kernel.org/~akpm/mmotm/

Build results here (as they get done): http://kisskb.ellerman.id.au/kisskb/head/3514/
--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/

P.S. hungry, yet?


Attachments:
(No filename) (408.00 B)
(No filename) (490.00 B)
Download all attachments

2010-12-05 08:25:19

by Jiri Slaby

[permalink] [raw]
Subject: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 12/03/2010 01:34 AM, [email protected] wrote:
> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to

Hi, this kernel regresses with respect to resume. It doesn't wake up,
the screen is black with blinking cursor at position [1, 1].
2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
far.

I'm using pm-suspend, any ideas what to test before I start to find the
reason on my own?

regards,
--
js

2010-12-05 13:08:50

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Sunday, December 05, 2010, Jiri Slaby wrote:
> On 12/03/2010 01:34 AM, [email protected] wrote:
> > The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>
> Hi, this kernel regresses with respect to resume. It doesn't wake up,
> the screen is black with blinking cursor at position [1, 1].
> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
> far.
>
> I'm using pm-suspend, any ideas what to test before I start to find the
> reason on my own?

Please try the pm_test tests for core, processors and devices, eg.:

# echo core > /sys/power/pm_test
# echo mem > /sys/power/state

(this is described in Documentation/power/basic-pm-debugging.txt .

That will tell you if you need to go through the BIOS for the bug to show up
and perhaps at what "level" the problem occurs.

It looks like the problem caused by NX-ing of the kernel code.

Thanks,
Rafael

2010-12-06 17:14:00

by Randy Dunlap

[permalink] [raw]
Subject: Re: mmotm 2010-12-02-16-34 uploaded

On Sat, 4 Dec 2010 11:39:20 +1100 Stephen Rothwell wrote:

> Hi Andrew,
>
> On Thu, 02 Dec 2010 16:34:54 -0800 [email protected] wrote:
> >
> > The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
> >
> > http://userweb.kernel.org/~akpm/mmotm/
>
> Build results here (as they get done): http://kisskb.ellerman.id.au/kisskb/head/3514/
> --

Lots of the errors seem to be toolchain related.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

2010-12-13 10:04:40

by Jiri Slaby

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 12/05/2010 02:08 PM, Rafael J. Wysocki wrote:
> On Sunday, December 05, 2010, Jiri Slaby wrote:
>> On 12/03/2010 01:34 AM, [email protected] wrote:
>>> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>>
>> Hi, this kernel regresses with respect to resume. It doesn't wake up,
>> the screen is black with blinking cursor at position [1, 1].
>> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
>> far.
>>
>> I'm using pm-suspend, any ideas what to test before I start to find the
>> reason on my own?
>
> Please try the pm_test tests for core, processors and devices, eg.:

Hmm, I haven't seen the issues since then. So it had to be some kind of
coincidence -- I see the issue occasionally for some time already. Now
it triggered twice in a row after I updated the kernel.

regards,
--
js

2010-12-13 21:11:13

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Monday, December 13, 2010, Jiri Slaby wrote:
> On 12/05/2010 02:08 PM, Rafael J. Wysocki wrote:
> > On Sunday, December 05, 2010, Jiri Slaby wrote:
> >> On 12/03/2010 01:34 AM, [email protected] wrote:
> >>> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
> >>
> >> Hi, this kernel regresses with respect to resume. It doesn't wake up,
> >> the screen is black with blinking cursor at position [1, 1].
> >> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
> >> far.
> >>
> >> I'm using pm-suspend, any ideas what to test before I start to find the
> >> reason on my own?
> >
> > Please try the pm_test tests for core, processors and devices, eg.:
>
> Hmm, I haven't seen the issues since then. So it had to be some kind of
> coincidence -- I see the issue occasionally for some time already. Now
> it triggered twice in a row after I updated the kernel.

Hmm. What hardware is that?

Rafael

2010-12-14 22:08:43

by Jiri Slaby

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 12/13/2010 10:10 PM, Rafael J. Wysocki wrote:
> On Monday, December 13, 2010, Jiri Slaby wrote:
>> On 12/05/2010 02:08 PM, Rafael J. Wysocki wrote:
>>> On Sunday, December 05, 2010, Jiri Slaby wrote:
>>>> On 12/03/2010 01:34 AM, [email protected] wrote:
>>>>> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>>>>
>>>> Hi, this kernel regresses with respect to resume. It doesn't wake up,
>>>> the screen is black with blinking cursor at position [1, 1].
>>>> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
>>>> far.
>>>>
>>>> I'm using pm-suspend, any ideas what to test before I start to find the
>>>> reason on my own?
>>>
>>> Please try the pm_test tests for core, processors and devices, eg.:
>>
>> Hmm, I haven't seen the issues since then. So it had to be some kind of
>> coincidence -- I see the issue occasionally for some time already. Now
>> it triggered twice in a row after I updated the kernel.
>
> Hmm. What hardware is that?

What exactly do you want to know about it? It's some specific intel
desktop machine, 3 years old, 2 intel cores, 6G of mem, 2 sata disks in
raid, dvb-t usb receiver (af9015), usb keyboard and mouse.

regards,
--
js

2010-12-14 22:22:54

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tuesday, December 14, 2010, Jiri Slaby wrote:
> On 12/13/2010 10:10 PM, Rafael J. Wysocki wrote:
> > On Monday, December 13, 2010, Jiri Slaby wrote:
> >> On 12/05/2010 02:08 PM, Rafael J. Wysocki wrote:
> >>> On Sunday, December 05, 2010, Jiri Slaby wrote:
> >>>> On 12/03/2010 01:34 AM, [email protected] wrote:
> >>>>> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
> >>>>
> >>>> Hi, this kernel regresses with respect to resume. It doesn't wake up,
> >>>> the screen is black with blinking cursor at position [1, 1].
> >>>> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
> >>>> far.
> >>>>
> >>>> I'm using pm-suspend, any ideas what to test before I start to find the
> >>>> reason on my own?
> >>>
> >>> Please try the pm_test tests for core, processors and devices, eg.:
> >>
> >> Hmm, I haven't seen the issues since then. So it had to be some kind of
> >> coincidence -- I see the issue occasionally for some time already. Now
> >> it triggered twice in a row after I updated the kernel.
> >
> > Hmm. What hardware is that?
>
> What exactly do you want to know about it? It's some specific intel
> desktop machine, 3 years old, 2 intel cores, 6G of mem, 2 sata disks in
> raid, dvb-t usb receiver (af9015), usb keyboard and mouse.

I'm seeing pretty much the same symptoms on quite different hardware, except
for one thing: USB keyboard and mouse.

Have you checked if writing 0 to /sys/power/pm_async helps?

Rafael

2011-02-04 18:33:57

by Jiri Slaby

[permalink] [raw]
Subject: Re: Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 01/31/2011 11:00 PM, Rafael J. Wysocki wrote:
> On Monday, January 31, 2011, Jiri Slaby wrote:
>> On 01/20/2011 10:02 PM, Rafael J. Wysocki wrote:
>>> On Thursday, January 20, 2011, Jiri Slaby wrote:
>>>> On 01/06/2011 03:18 PM, Jiri Slaby wrote:
>>>>> On 12/14/2010 11:22 PM, Rafael J. Wysocki wrote:
>>>>>> On Tuesday, December 14, 2010, Jiri Slaby wrote:
>>>>>>> On 12/13/2010 10:10 PM, Rafael J. Wysocki wrote:
>>>>>>>> On Monday, December 13, 2010, Jiri Slaby wrote:
>>>>>>>>> On 12/05/2010 02:08 PM, Rafael J. Wysocki wrote:
>>>>>>>>>> On Sunday, December 05, 2010, Jiri Slaby wrote:
>>>>>>>>>>> On 12/03/2010 01:34 AM, [email protected] wrote:
>>>>>>>>>>>> The mm-of-the-moment snapshot 2010-12-02-16-34 has been uploaded to
>>>>>>>>>>>
>>>>>>>>>>> Hi, this kernel regresses with respect to resume. It doesn't wake up,
>>>>>>>>>>> the screen is black with blinking cursor at position [1, 1].
>>>>>>>>>>> 2010-11-23-16-12 seemed to be OK. In this one it is 100% reproducible so
>>>>>>>>>>> far.
>>>>>>>>>>>
>>>>>>>>>>> I'm using pm-suspend, any ideas what to test before I start to find the
>>>>>>>>>>> reason on my own?
>>>>>>>>>>
>>>>>>>>>> Please try the pm_test tests for core, processors and devices, eg.:
>>>>>>>>>
>>>>>>>>> Hmm, I haven't seen the issues since then. So it had to be some kind of
>>>>>>>>> coincidence -- I see the issue occasionally for some time already. Now
>>>>>>>>> it triggered twice in a row after I updated the kernel.
>>>>>>>>
>>>>>>>> Hmm. What hardware is that?
>>>>>>>
>>>>>>> What exactly do you want to know about it? It's some specific intel
>>>>>>> desktop machine, 3 years old, 2 intel cores, 6G of mem, 2 sata disks in
>>>>>>> raid, dvb-t usb receiver (af9015), usb keyboard and mouse.
>>>>>>
>>>>>> I'm seeing pretty much the same symptoms on quite different hardware, except
>>>>>> for one thing: USB keyboard and mouse.
>>>>>>
>>>>>> Have you checked if writing 0 to /sys/power/pm_async helps?
>>>>>
>>>>> It's very hard to reproduce (it happens once a week or two), so I can't
>>>>> say yet. As it happened yesterday again, going to test it from now on.
>>>>
>>>> Ok, I haven't seen the issue with 0 in /sys/power/pm_async for two weeks
>>>> now (I added it to boot.local). I would say it's related to that...
>>>
>>> In that case the next step would be to build the kernel with
>>> CONFIG_PM_ADVANCED_DEBUG set and try to switch the async flag for individual
>>> devices (it is located is /sys/devices/.../power/ for each device).
>>>
>>> For example, I wonder if it is sufficient to unset it for all USB devices.
>>
>> It seems to suffice... No hangs still. Should I enable pm_async back
>> again to confirm the issue is still present?
>
> Yes, please, it would be good to know for sure.

Ok, confirmed right now :).

I disabled pm_async for USB again. What do you suggest next?

thanks,
--
js

2011-02-04 19:33:10

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Fri, 4 Feb 2011, Jiri Slaby wrote:

> >> It seems to suffice... No hangs still. Should I enable pm_async back
> >> again to confirm the issue is still present?
> >
> > Yes, please, it would be good to know for sure.
>
> Ok, confirmed right now :).
>
> I disabled pm_async for USB again. What do you suggest next?

What happens if you leave pm_async enabled but unplug all the USB
devices before suspending? If there are any USB devices you can't
unplug, you can get an equivalent result by unconfiguring the root
hubs:

for a in /sys/bus/usb/devices/usb* ; do
echo 0 >$a/bConfigurationValue
done

Alan Stern

2011-02-04 19:38:37

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/04/2011 08:33 PM, Alan Stern wrote:
> On Fri, 4 Feb 2011, Jiri Slaby wrote:
>
>>>> It seems to suffice... No hangs still. Should I enable pm_async back
>>>> again to confirm the issue is still present?
>>>
>>> Yes, please, it would be good to know for sure.
>>
>> Ok, confirmed right now :).
>>
>> I disabled pm_async for USB again. What do you suggest next?
>
> What happens if you leave pm_async enabled but unplug all the USB
> devices before suspending?

Then I cannot suspend at all (ENOINPUTDEVICE)... And this would be
painful as the bug occurs once a week or so.

> If there are any USB devices you can't
> unplug, you can get an equivalent result by unconfiguring the root
> hubs:
>
> for a in /sys/bus/usb/devices/usb* ; do
> echo 0 >$a/bConfigurationValue
> done

Well, I can put this into suspend/resume scripts. What's the opposite
operation? 1 > $a/bConfigurationValue?

thanks,
--
js

2011-02-04 20:07:26

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Fri, 4 Feb 2011, Jiri Slaby wrote:

> On 02/04/2011 08:33 PM, Alan Stern wrote:
> > On Fri, 4 Feb 2011, Jiri Slaby wrote:
> >
> >>>> It seems to suffice... No hangs still. Should I enable pm_async back
> >>>> again to confirm the issue is still present?
> >>>
> >>> Yes, please, it would be good to know for sure.
> >>
> >> Ok, confirmed right now :).
> >>
> >> I disabled pm_async for USB again. What do you suggest next?
> >
> > What happens if you leave pm_async enabled but unplug all the USB
> > devices before suspending?
>
> Then I cannot suspend at all (ENOINPUTDEVICE)... And this would be
> painful as the bug occurs once a week or so.

You can suspend using a remote network login. Agreed, this would be
painful.

> > If there are any USB devices you can't
> > unplug, you can get an equivalent result by unconfiguring the root
> > hubs:
> >
> > for a in /sys/bus/usb/devices/usb* ; do
> > echo 0 >$a/bConfigurationValue
> > done
>
> Well, I can put this into suspend/resume scripts. What's the opposite
> operation? 1 > $a/bConfigurationValue?

Yes.

Alan Stern

2011-02-22 08:45:50

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/04/2011 08:33 PM, Alan Stern wrote:
> On Fri, 4 Feb 2011, Jiri Slaby wrote:
>
>>>> It seems to suffice... No hangs still. Should I enable pm_async back
>>>> again to confirm the issue is still present?
>>>
>>> Yes, please, it would be good to know for sure.
>>
>> Ok, confirmed right now :).
>>
>> I disabled pm_async for USB again. What do you suggest next?
>
> What happens if you leave pm_async enabled but unplug all the USB
> devices before suspending? If there are any USB devices you can't
> unplug, you can get an equivalent result by unconfiguring the root
> hubs:
>
> for a in /sys/bus/usb/devices/usb* ; do
> echo 0 >$a/bConfigurationValue
> done

This doesn't seem to help. The hang happened 3 times during the 2 weeks.

I have /etc/pm/sleep.d/99usb-debug with:
#!/bin/bash

send() {
for a in /sys/bus/usb/devices/usb* ; do
echo $1 >$a/bConfigurationValue
done
}

case "$1" in
hibernate|suspend)
send 0
;;
thaw|resume)
send 1
;;
*)
;;
esac

exit 0

And it indeed properly enable/disable usb before/after suspend.

regards,
--
js

2011-02-22 15:36:23

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tue, 22 Feb 2011, Jiri Slaby wrote:

> On 02/04/2011 08:33 PM, Alan Stern wrote:
> > On Fri, 4 Feb 2011, Jiri Slaby wrote:
> >
> >>>> It seems to suffice... No hangs still. Should I enable pm_async back
> >>>> again to confirm the issue is still present?
> >>>
> >>> Yes, please, it would be good to know for sure.
> >>
> >> Ok, confirmed right now :).
> >>
> >> I disabled pm_async for USB again. What do you suggest next?
> >
> > What happens if you leave pm_async enabled but unplug all the USB
> > devices before suspending? If there are any USB devices you can't
> > unplug, you can get an equivalent result by unconfiguring the root
> > hubs:
> >
> > for a in /sys/bus/usb/devices/usb* ; do
> > echo 0 >$a/bConfigurationValue
> > done
>
> This doesn't seem to help. The hang happened 3 times during the 2 weeks.
>
> I have /etc/pm/sleep.d/99usb-debug with:
> #!/bin/bash
>
> send() {
> for a in /sys/bus/usb/devices/usb* ; do
> echo $1 >$a/bConfigurationValue
> done
> }
>
> case "$1" in
> hibernate|suspend)
> send 0
> ;;
> thaw|resume)
> send 1
> ;;
> *)
> ;;
> esac
>
> exit 0
>
> And it indeed properly enable/disable usb before/after suspend.

Strange indeed. It's worth noting that the async stuff affects only
the normal suspend and resume operations, not the late-suspend and
early-resume operations. This means that it all likelihood, the system
crashes either before finishing the suspend or after doing a fair
amount of the resume. And yet that's not consistent with what you see
on the screen.

By the way, are you booting with no_console_suspend? And do you do
"echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
suspending?

What about if you leave async enabled for all the USB devices _except_
usb[1-N]?

Alan Stern

2011-02-23 11:58:54

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/22/2011 04:36 PM, Alan Stern wrote:
> By the way, are you booting with no_console_suspend? And do you do
> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> suspending?

Nope.

> What about if you leave async enabled for all the USB devices _except_
> usb[1-N]?

Ok, so now I have:
/sys/bus/usb/devices/usb1/power/async:disabled
/sys/bus/usb/devices/usb2/power/async:disabled
/sys/bus/usb/devices/usb3/power/async:disabled
/sys/bus/usb/devices/usb4/power/async:disabled
/sys/bus/usb/devices/usb5/power/async:disabled
/sys/bus/usb/devices/usb6/power/async:disabled
/sys/bus/usb/devices/usb7/power/async:disabled
/sys/bus/usb/devices/usb8/power/async:disabled
/sys/bus/usb/devices/1-0:1.0/power/async:enabled
/sys/bus/usb/devices/2-0:1.0/power/async:enabled
/sys/bus/usb/devices/2-6/power/async:enabled
/sys/bus/usb/devices/2-6:1.0/power/async:enabled
/sys/bus/usb/devices/2-6:1.1/power/async:enabled
/sys/bus/usb/devices/3-0:1.0/power/async:enabled
/sys/bus/usb/devices/4-0:1.0/power/async:enabled
/sys/bus/usb/devices/4-2/power/async:enabled
/sys/bus/usb/devices/4-2.1/power/async:enabled
/sys/bus/usb/devices/4-2:1.0/power/async:enabled
/sys/bus/usb/devices/4-2.1:1.0/power/async:enabled
/sys/bus/usb/devices/4-2.1:1.1/power/async:enabled
/sys/bus/usb/devices/4-2.2/power/async:enabled
/sys/bus/usb/devices/4-2.2:1.0/power/async:enabled
/sys/bus/usb/devices/5-0:1.0/power/async:enabled
/sys/bus/usb/devices/6-0:1.0/power/async:enabled
/sys/bus/usb/devices/7-0:1.0/power/async:enabled
/sys/bus/usb/devices/8-0:1.0/power/async:enabled

Let's see.

regards,
--
js

2011-02-23 15:59:33

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Wed, 23 Feb 2011, Jiri Slaby wrote:

> On 02/22/2011 04:36 PM, Alan Stern wrote:
> > By the way, are you booting with no_console_suspend? And do you do
> > "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> > suspending?
>
> Nope.

If you do, it's possible you might get some useful information on the
screen the next time one of these hangs occurs.

Alan Stern

2011-02-24 18:41:32

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/22/2011 04:36 PM, Alan Stern wrote:
> By the way, are you booting with no_console_suspend? And do you do
> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> suspending?
>
> What about if you leave async enabled for all the USB devices _except_
> usb[1-N]?

It died right now.

So I booted with no_console_suspend.

thanks,
--
js

2011-03-08 09:13:57

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/22/2011 04:36 PM, Alan Stern wrote:
> By the way, are you booting with no_console_suspend? And do you do
> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> suspending?

Unfortunately there are no messages at all.

Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
switch a console in such case? And if yes, to which one?

thanks,
--
js

2011-03-08 19:25:14

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tuesday, March 08, 2011, Jiri Slaby wrote:
> On 02/22/2011 04:36 PM, Alan Stern wrote:
> > By the way, are you booting with no_console_suspend? And do you do
> > "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> > suspending?
>
> Unfortunately there are no messages at all.
>
> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
> switch a console in such case? And if yes, to which one?

pm-utils don't, but s2ram does, I'm not sure from the top of my head to
which one, though.

If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".

Thanks,
Rafael

2011-03-08 20:31:14

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>> On 02/22/2011 04:36 PM, Alan Stern wrote:
>>> By the way, are you booting with no_console_suspend? And do you do
>>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
>>> suspending?
>>
>> Unfortunately there are no messages at all.
>>
>> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
>> switch a console in such case? And if yes, to which one?
>
> pm-utils don't, but s2ram does, I'm not sure from the top of my head to
> which one, though.
>
> If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".

Yeah, I meant kernel modesetting, of course. Sorry for the confusion.

I don't have /usr/sbin/s2ram. So I commented the --quirk-no-chvt thing
in a pm-utils script.

thanks,
--
js

2011-03-08 22:12:24

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tuesday, March 08, 2011, Jiri Slaby wrote:
> On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
> > On Tuesday, March 08, 2011, Jiri Slaby wrote:
> >> On 02/22/2011 04:36 PM, Alan Stern wrote:
> >>> By the way, are you booting with no_console_suspend? And do you do
> >>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> >>> suspending?
> >>
> >> Unfortunately there are no messages at all.
> >>
> >> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
> >> switch a console in such case? And if yes, to which one?
> >
> > pm-utils don't, but s2ram does, I'm not sure from the top of my head to
> > which one, though.
> >
> > If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".
>
> Yeah, I meant kernel modesetting, of course. Sorry for the confusion.
>
> I don't have /usr/sbin/s2ram.

Ah. So it's gone from Factory? Interesting.

2011-03-08 22:14:09

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 03/08/2011 11:12 PM, Rafael J. Wysocki wrote:
> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>> On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
>>> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>>>> On 02/22/2011 04:36 PM, Alan Stern wrote:
>>>>> By the way, are you booting with no_console_suspend? And do you do
>>>>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
>>>>> suspending?
>>>>
>>>> Unfortunately there are no messages at all.
>>>>
>>>> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
>>>> switch a console in such case? And if yes, to which one?
>>>
>>> pm-utils don't, but s2ram does, I'm not sure from the top of my head to
>>> which one, though.
>>>
>>> If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".
>>
>> Yeah, I meant kernel modesetting, of course. Sorry for the confusion.
>>
>> I don't have /usr/sbin/s2ram.
>
> Ah. So it's gone from Factory? Interesting.

I don't know, maybe it's in suspend package which I don't have installed.

--
js

2011-03-08 22:15:47

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tuesday, March 08, 2011, Jiri Slaby wrote:
> On 03/08/2011 11:12 PM, Rafael J. Wysocki wrote:
> > On Tuesday, March 08, 2011, Jiri Slaby wrote:
> >> On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
> >>> On Tuesday, March 08, 2011, Jiri Slaby wrote:
> >>>> On 02/22/2011 04:36 PM, Alan Stern wrote:
> >>>>> By the way, are you booting with no_console_suspend? And do you do
> >>>>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> >>>>> suspending?
> >>>>
> >>>> Unfortunately there are no messages at all.
> >>>>
> >>>> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
> >>>> switch a console in such case? And if yes, to which one?
> >>>
> >>> pm-utils don't, but s2ram does, I'm not sure from the top of my head to
> >>> which one, though.
> >>>
> >>> If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".
> >>
> >> Yeah, I meant kernel modesetting, of course. Sorry for the confusion.
> >>
> >> I don't have /usr/sbin/s2ram.
> >
> > Ah. So it's gone from Factory? Interesting.
>
> I don't know, maybe it's in suspend package which I don't have installed.

It's there, yes.

2011-03-08 22:16:48

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Tuesday, March 08, 2011, Jiri Slaby wrote:
> On 03/08/2011 11:12 PM, Rafael J. Wysocki wrote:
> > On Tuesday, March 08, 2011, Jiri Slaby wrote:
> >> On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
> >>> On Tuesday, March 08, 2011, Jiri Slaby wrote:
> >>>> On 02/22/2011 04:36 PM, Alan Stern wrote:
> >>>>> By the way, are you booting with no_console_suspend? And do you do
> >>>>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> >>>>> suspending?
> >>>>
> >>>> Unfortunately there are no messages at all.
> >>>>
> >>>> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
> >>>> switch a console in such case? And if yes, to which one?
> >>>
> >>> pm-utils don't, but s2ram does, I'm not sure from the top of my head to
> >>> which one, though.
> >>>
> >>> If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".
> >>
> >> Yeah, I meant kernel modesetting, of course. Sorry for the confusion.
> >>
> >> I don't have /usr/sbin/s2ram.
> >
> > Ah. So it's gone from Factory? Interesting.
>
> I don't know, maybe it's in suspend package which I don't have installed.

Hm. So you use the in-kernel hibernate code?

The one in the suspend package is generally faster.

2011-03-08 22:26:49

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 03/08/2011 11:16 PM, Rafael J. Wysocki wrote:
> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>> On 03/08/2011 11:12 PM, Rafael J. Wysocki wrote:
>>> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>>>> On 03/08/2011 08:25 PM, Rafael J. Wysocki wrote:
>>>>> On Tuesday, March 08, 2011, Jiri Slaby wrote:
>>>>>> On 02/22/2011 04:36 PM, Alan Stern wrote:
>>>>>>> By the way, are you booting with no_console_suspend? And do you do
>>>>>>> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
>>>>>>> suspending?
>>>>>>
>>>>>> Unfortunately there are no messages at all.
>>>>>>
>>>>>> Rafael, this is a Factory with intel gfx (modesetting). Do pm-utils
>>>>>> switch a console in such case? And if yes, to which one?
>>>>>
>>>>> pm-utils don't, but s2ram does, I'm not sure from the top of my head to
>>>>> which one, though.
>>>>>
>>>>> If you use a KMS driver (I get you do), please just "chmod a-x /usr/sbin/s2ram".
>>>>
>>>> Yeah, I meant kernel modesetting, of course. Sorry for the confusion.
>>>>
>>>> I don't have /usr/sbin/s2ram.
>>>
>>> Ah. So it's gone from Factory? Interesting.
>>
>> I don't know, maybe it's in suspend package which I don't have installed.
>
> Hm. So you use the in-kernel hibernate code?
>
> The one in the suspend package is generally faster.

I don't use hibernation at all. This is a desktop -- suspending to S3.

--
js

2011-03-30 14:11:24

by Jiri Slaby

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On 02/22/2011 04:36 PM, Alan Stern wrote:
> On Tue, 22 Feb 2011, Jiri Slaby wrote:
>
>> On 02/04/2011 08:33 PM, Alan Stern wrote:
>>> On Fri, 4 Feb 2011, Jiri Slaby wrote:
>>>
>>>>>> It seems to suffice... No hangs still. Should I enable pm_async back
>>>>>> again to confirm the issue is still present?
>>>>>
>>>>> Yes, please, it would be good to know for sure.
>>>>
>>>> Ok, confirmed right now :).
>>>>
>>>> I disabled pm_async for USB again. What do you suggest next?
>>>
>>> What happens if you leave pm_async enabled but unplug all the USB
>>> devices before suspending? If there are any USB devices you can't
>>> unplug, you can get an equivalent result by unconfiguring the root
>>> hubs:
>>>
>>> for a in /sys/bus/usb/devices/usb* ; do
>>> echo 0 >$a/bConfigurationValue
>>> done
>>
>> This doesn't seem to help. The hang happened 3 times during the 2 weeks.
>>
>> I have /etc/pm/sleep.d/99usb-debug with:
>> #!/bin/bash
>>
>> send() {
>> for a in /sys/bus/usb/devices/usb* ; do
>> echo $1 >$a/bConfigurationValue
>> done
>> }
>>
>> case "$1" in
>> hibernate|suspend)
>> send 0
>> ;;
>> thaw|resume)
>> send 1
>> ;;
>> *)
>> ;;
>> esac
>>
>> exit 0
>>
>> And it indeed properly enable/disable usb before/after suspend.
>
> Strange indeed. It's worth noting that the async stuff affects only
> the normal suspend and resume operations, not the late-suspend and
> early-resume operations. This means that it all likelihood, the system
> crashes either before finishing the suspend or after doing a fair
> amount of the resume. And yet that's not consistent with what you see
> on the screen.
>
> By the way, are you booting with no_console_suspend? And do you do
> "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> suspending?

I'm testing this on my desktop. I found out yesterday, that I had async
completely disabled. So I have no output yet.

I took my dvb-t tuner from desktop and connected it to my notebook. And
got a similar hang during resume right now. It may not be related
though. The trace is:
s2disk D 0000000000000000 0 6125 5902 0x00000004
ffff8800797aba78 0000000000000082 ffff8800797ab9f8 0000000000012ac0
ffff8800797abfd8 0000000000012ac0 ffff8800797abfd8 ffff8800797abfd8
ffff8800777fe7f0 0000000000012ac0 0000000000012ac0 ffff8800797aa000
Call Trace:
[<ffffffff8151e2ed>] schedule_timeout+0x28d/0x310
[<ffffffff8151d410>] wait_for_common+0xc0/0x150
[<ffffffff8133ad22>] _request_firmware+0x132/0x270
[<ffffffffa06df2c7>] dvb_usb_download_firmware+0x37/0xf0 [dvb_usb]
[<ffffffffa06dfbe5>] dvb_usb_device_init+0x165/0x1b0 [dvb_usb]
[<ffffffffa06d6c27>] af9015_usb_probe+0x87/0xa0 [dvb_usb_af9015]
[<ffffffff8138d9d2>] usb_probe_interface+0x142/0x270
[<ffffffff8132f3c0>] really_probe+0x70/0x220
[<ffffffff8132f757>] driver_probe_device+0x47/0xa0
[<ffffffff8132e19c>] bus_for_each_drv+0x5c/0x90
[<ffffffff8132f62f>] device_attach+0x8f/0xb0
[<ffffffff8138d5b0>] usb_rebind_intf+0x60/0xa0
[<ffffffff8138d6c7>] do_unbind_rebind+0x77/0xb0
[<ffffffff8138d76b>] usb_resume+0x6b/0xb0
[<ffffffff8137f96b>] usb_dev_complete+0xb/0x10
[<ffffffff81334d1e>] device_complete+0x8e/0xe0
[<ffffffff81335da1>] dpm_resume_end+0xa1/0x120
[<ffffffff8109d890>] hibernation_snapshot+0xc0/0x120
[<ffffffff810a1cde>] snapshot_ioctl+0x3ae/0x590
[<ffffffff81169794>] do_vfs_ioctl+0x84/0x2f0
[<ffffffff81169a98>] sys_ioctl+0x98/0xa0
[<ffffffff81002ed2>] system_call_fastpath+0x16/0x1b
[<00007fe6c82f8ce7>] 0x7fe6c82f8ce7


The firmware request should time out. I think I waited for longer than
60 s before when I saw the hangs on the desktop, But do you have an idea
why it doesn't load the FW immediately?

The device is:
Bus 001 Device 010: ID 0413:6029 Leadtek Research, Inc. WinFast DTV
Dongle Gold
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0413 Leadtek Research, Inc.
idProduct 0x6029 WinFast DTV Dongle Gold
bcdDevice 2.00
iManufacturer 1 Leadtek
iProduct 2 WinFast DTV Dongle Gold
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 71
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 1 Keyboard
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 65
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 16
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)

thanks,
--
js

2011-03-30 15:10:19

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Wed, 30 Mar 2011, Jiri Slaby wrote:

> > Strange indeed. It's worth noting that the async stuff affects only
> > the normal suspend and resume operations, not the late-suspend and
> > early-resume operations. This means that it all likelihood, the system
> > crashes either before finishing the suspend or after doing a fair
> > amount of the resume. And yet that's not consistent with what you see
> > on the screen.
> >
> > By the way, are you booting with no_console_suspend? And do you do
> > "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> > suspending?
>
> I'm testing this on my desktop. I found out yesterday, that I had async
> completely disabled. So I have no output yet.
>
> I took my dvb-t tuner from desktop and connected it to my notebook. And
> got a similar hang during resume right now. It may not be related
> though. The trace is:
> s2disk D 0000000000000000 0 6125 5902 0x00000004
> ffff8800797aba78 0000000000000082 ffff8800797ab9f8 0000000000012ac0
> ffff8800797abfd8 0000000000012ac0 ffff8800797abfd8 ffff8800797abfd8
> ffff8800777fe7f0 0000000000012ac0 0000000000012ac0 ffff8800797aa000
> Call Trace:
> [<ffffffff8151e2ed>] schedule_timeout+0x28d/0x310
> [<ffffffff8151d410>] wait_for_common+0xc0/0x150
> [<ffffffff8133ad22>] _request_firmware+0x132/0x270
> [<ffffffffa06df2c7>] dvb_usb_download_firmware+0x37/0xf0 [dvb_usb]
> [<ffffffffa06dfbe5>] dvb_usb_device_init+0x165/0x1b0 [dvb_usb]
> [<ffffffffa06d6c27>] af9015_usb_probe+0x87/0xa0 [dvb_usb_af9015]
> [<ffffffff8138d9d2>] usb_probe_interface+0x142/0x270
> [<ffffffff8132f3c0>] really_probe+0x70/0x220
> [<ffffffff8132f757>] driver_probe_device+0x47/0xa0
> [<ffffffff8132e19c>] bus_for_each_drv+0x5c/0x90
> [<ffffffff8132f62f>] device_attach+0x8f/0xb0
> [<ffffffff8138d5b0>] usb_rebind_intf+0x60/0xa0
> [<ffffffff8138d6c7>] do_unbind_rebind+0x77/0xb0
> [<ffffffff8138d76b>] usb_resume+0x6b/0xb0
> [<ffffffff8137f96b>] usb_dev_complete+0xb/0x10
> [<ffffffff81334d1e>] device_complete+0x8e/0xe0
> [<ffffffff81335da1>] dpm_resume_end+0xa1/0x120
> [<ffffffff8109d890>] hibernation_snapshot+0xc0/0x120
> [<ffffffff810a1cde>] snapshot_ioctl+0x3ae/0x590
> [<ffffffff81169794>] do_vfs_ioctl+0x84/0x2f0
> [<ffffffff81169a98>] sys_ioctl+0x98/0xa0
> [<ffffffff81002ed2>] system_call_fastpath+0x16/0x1b
> [<00007fe6c82f8ce7>] 0x7fe6c82f8ce7
>
>
> The firmware request should time out. I think I waited for longer than
> 60 s before when I saw the hangs on the desktop, But do you have an idea
> why it doesn't load the FW immediately?

I don't know why the request didn't time out, but this behavior should
at least be reproducible. Your stack trace implies that the firmware
will need to be transferred every time the device resumes... but of
course this leaves open the question of why your desktop crashed only
occasionally.

Probably the firmware wasn't transferred immediately because the kernel
relies on a userspace process to find and load the firmware, but at
that point userspace was still frozen.

Rafael, this does seem to be a general problem. Suppose a new device
gets connected while the system is suspended. How is the driver's
probe method supposed to cope if it gets called while userspace is
still frozen but it needs to load some firmware?

Is the answer that probing should always be delayed until after tasks
are thawed? There must be lots of subsystems which would have trouble
doing that, although we ought to be able to implement delayed probing
from within the driver core easily enough.

Alan Stern

2011-03-30 20:01:29

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Wednesday, March 30, 2011, Alan Stern wrote:
> On Wed, 30 Mar 2011, Jiri Slaby wrote:
>
> > > Strange indeed. It's worth noting that the async stuff affects only
> > > the normal suspend and resume operations, not the late-suspend and
> > > early-resume operations. This means that it all likelihood, the system
> > > crashes either before finishing the suspend or after doing a fair
> > > amount of the resume. And yet that's not consistent with what you see
> > > on the screen.
> > >
> > > By the way, are you booting with no_console_suspend? And do you do
> > > "echo 8 >/proc/sys/kernel/printk" (or equivalently, Alt-SysRq-8) before
> > > suspending?
> >
> > I'm testing this on my desktop. I found out yesterday, that I had async
> > completely disabled. So I have no output yet.
> >
> > I took my dvb-t tuner from desktop and connected it to my notebook. And
> > got a similar hang during resume right now. It may not be related
> > though. The trace is:
> > s2disk D 0000000000000000 0 6125 5902 0x00000004
> > ffff8800797aba78 0000000000000082 ffff8800797ab9f8 0000000000012ac0
> > ffff8800797abfd8 0000000000012ac0 ffff8800797abfd8 ffff8800797abfd8
> > ffff8800777fe7f0 0000000000012ac0 0000000000012ac0 ffff8800797aa000
> > Call Trace:
> > [<ffffffff8151e2ed>] schedule_timeout+0x28d/0x310
> > [<ffffffff8151d410>] wait_for_common+0xc0/0x150
> > [<ffffffff8133ad22>] _request_firmware+0x132/0x270
> > [<ffffffffa06df2c7>] dvb_usb_download_firmware+0x37/0xf0 [dvb_usb]
> > [<ffffffffa06dfbe5>] dvb_usb_device_init+0x165/0x1b0 [dvb_usb]
> > [<ffffffffa06d6c27>] af9015_usb_probe+0x87/0xa0 [dvb_usb_af9015]
> > [<ffffffff8138d9d2>] usb_probe_interface+0x142/0x270
> > [<ffffffff8132f3c0>] really_probe+0x70/0x220
> > [<ffffffff8132f757>] driver_probe_device+0x47/0xa0
> > [<ffffffff8132e19c>] bus_for_each_drv+0x5c/0x90
> > [<ffffffff8132f62f>] device_attach+0x8f/0xb0
> > [<ffffffff8138d5b0>] usb_rebind_intf+0x60/0xa0
> > [<ffffffff8138d6c7>] do_unbind_rebind+0x77/0xb0
> > [<ffffffff8138d76b>] usb_resume+0x6b/0xb0
> > [<ffffffff8137f96b>] usb_dev_complete+0xb/0x10
> > [<ffffffff81334d1e>] device_complete+0x8e/0xe0
> > [<ffffffff81335da1>] dpm_resume_end+0xa1/0x120
> > [<ffffffff8109d890>] hibernation_snapshot+0xc0/0x120
> > [<ffffffff810a1cde>] snapshot_ioctl+0x3ae/0x590
> > [<ffffffff81169794>] do_vfs_ioctl+0x84/0x2f0
> > [<ffffffff81169a98>] sys_ioctl+0x98/0xa0
> > [<ffffffff81002ed2>] system_call_fastpath+0x16/0x1b
> > [<00007fe6c82f8ce7>] 0x7fe6c82f8ce7
> >
> >
> > The firmware request should time out. I think I waited for longer than
> > 60 s before when I saw the hangs on the desktop, But do you have an idea
> > why it doesn't load the FW immediately?
>
> I don't know why the request didn't time out, but this behavior should
> at least be reproducible. Your stack trace implies that the firmware
> will need to be transferred every time the device resumes... but of
> course this leaves open the question of why your desktop crashed only
> occasionally.
>
> Probably the firmware wasn't transferred immediately because the kernel
> relies on a userspace process to find and load the firmware, but at
> that point userspace was still frozen.
>
> Rafael, this does seem to be a general problem. Suppose a new device
> gets connected while the system is suspended. How is the driver's
> probe method supposed to cope if it gets called while userspace is
> still frozen but it needs to load some firmware?
>
> Is the answer that probing should always be delayed until after tasks
> are thawed? There must be lots of subsystems which would have trouble
> doing that, although we ought to be able to implement delayed probing
> from within the driver core easily enough.

I don't know how to solve that.

First off, the prepare routines of drivers that need to load firmware during
resume probably should preload the firmware for the devices present during the
suspend.

Second, I don't generally think drivers should probe for devices during resume.
I guess the delayed probing would be the cleanest appoach here.

Thanks,
Rafael

2011-03-30 21:20:01

by Alan Stern

[permalink] [raw]
Subject: Re: [linux-pm] Resume hangs [was: mmotm 2010-12-02-16-34 uploaded]

On Wed, 30 Mar 2011, Rafael J. Wysocki wrote:

> > Rafael, this does seem to be a general problem. Suppose a new device
> > gets connected while the system is suspended. How is the driver's
> > probe method supposed to cope if it gets called while userspace is
> > still frozen but it needs to load some firmware?
> >
> > Is the answer that probing should always be delayed until after tasks
> > are thawed? There must be lots of subsystems which would have trouble
> > doing that, although we ought to be able to implement delayed probing
> > from within the driver core easily enough.
>
> I don't know how to solve that.
>
> First off, the prepare routines of drivers that need to load firmware during
> resume probably should preload the firmware for the devices present during the
> suspend.

That's okay for drivers that are bound to a device before the suspend
starts. But we also need to handle new devices added while the system
was asleep.

> Second, I don't generally think drivers should probe for devices during resume.
> I guess the delayed probing would be the cleanest appoach here.

Here's the difficulty. Normally the USB subsystem does use delayed
probing -- in fact, probing is done in a freezable thread. However
this is a special case. Not all USB drivers support suspend/resume;
those that don't get unbound during suspend and then rebound during
resume. The rebinding occurs in the "complete" phase of the resume,
before tasks are thawed.

I suppose the rebinding could be delayed. It would be better to fix
the USB DVB drivers, though, by adding PM support. But there's a bunch
of them in drivers/media/dvb/dvb-usb, and AFAICS they would all need to
be fixed. And I have no idea of what changes they would need.

Do you have any better suggestions?

Alan Stern