From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Jones Subject: ondemand vs suspend. Date: Tue, 13 Jun 2006 16:53:13 -0400 Message-ID: <20060613205313.GA11879@redhat.com> Mime-Version: 1.0 Return-path: Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cpufreq-bounces@lists.linux.org.uk Errors-To: cpufreq-bounces+glkc-cpufreq=m.gmane.org+glkc-cpufreq=m.gmane.org@lists.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: cpufreq@lists.linux.org.uk Cc: pjones@redhat.com Here's a puzzling case that Peter stumbled across when experimenting with suspend on one of the new dual-core Intel-based Mac Mini's. The hibernate process would just lock up, and never shut down. 4190 ? S< 0:00 \_ [kstopmachine] 4191 ? Z< 0:00 \_ [kstopmachine] dmesg showed that we had offlined the 2nd core.. PM: suspend-to-disk mode set to 'platform' Freezing cpus ... Breaking affinity for irq 0 Breaking affinity for irq 14 Breaking affinity for irq 217 Breaking affinity for irq 225 CPU 1 is now offline SMP alternatives: switching to UP code and sysrq-t showed that we were erm.. spinning. ondemand D EDDD1300 3452 1462 11 2160 1345 (L-TLB) f7f8eec0 f7f8eef4 f7f8eef4 eddd1300 003d10ba c05a4c2c 0000000a f7eb4fcc f7eb4eb0 c06e0c00 c19c4860 eddd1300 003d10ba 00000000 00000000 00000000 f7f8eedc c041fc12 00000296 ffffffff f7f8eef4 00000246 00000246 c06e65d8 Call Trace: __down+0x131/0x14a __down_failed+0xa/0x10 .text.lock.cpu+0x2b/0x32 lock_cpu_hotplug+0xa/0xc __cpufreq_driver_target+0x15/0x6d do_dbs_timer+0x229/0x287 [cpufreq_ondemand] run_workqueue+0x81/0xc0 worker_thread+0xce/0x101 kthread+0xa3/0xd0 kernel_thread_helper+0x5/0xb pm-hibernate D F395EB00 1816 3934 2495 (NOTLB) e632ade8 c0465c6c 00000004 f395eb00 003d10ba f2c31800 00000007 ddc7e44c ddc7e330 c1b1b190 c19c4860 f395eb00 003d10ba 00000000 00000000 c0481c9c f8bcfa40 f8bcfa40 e632a000 e632adf8 00000000 c0438ad8 f8bce646 f8bcfa54 Call Trace: __mutex_lock_slowpath+0x19b/0x3e3 mutex_lock+0x24/0x27 cpufreq_governor_dbs+0x20e/0x2b0 [cpufreq_ondemand] __cpufreq_governor+0x57/0xd8 cpufreq_remove_dev+0x197/0x208 cpufreq_cpu_callback+0x49/0x52 notifier_call_chain+0x18/0x29 blocking_notifier_call_chain+0x37/0x4f cpu_down+0x12b/0x1c8 disable_nonboot_cpus+0x35/0xa1 prepare_processes+0x13/0x3b pm_suspend_disk+0x9/0xf3 enter_state+0x53/0x1c1 state_store+0x86/0x9c subsys_attr_store+0x20/0x25 sysfs_write_file+0xab/0xd1 vfs_write+0xab/0x154 sys_write+0x3b/0x60 syscall_call+0x7/0xb kstopmachine S ED25F800 3428 4190 11 4191 2160 (L-TLB) dc184fac c19c4860 c04f473a ed25f800 003d10ba c041115b 00000003 f7e38e4c f7e38d30 c1acf050 c19cc860 ed25f800 003d10ba 00000000 00000001 00000246 e632ae94 dc184f90 00000246 e632ae90 00000000 c041ee49 00000000 00000000 Call Trace: do_stop+0xf9/0x129 kthread+0xa3/0xd0 kernel_thread_helper+0x5/0xb kstopmachine X ED25F800 3736 4191 4190 (L-TLB) f7ecefb4 c0605fda f7ecef78 ed25f800 003d10ba 003d10ba 00000002 f2e622cc f2e621b0 ddc7e330 c19c4860 ed25f800 003d10ba 00000000 00000000 00000000 f7ecef94 00000202 00000202 f2ec1ad8 00000000 c0608093 f7ecefb4 00000202 Call Trace: do_exit+0x7a1/0x7ab kernel_thread_helper_end+0x0/0xe D pm-hibernate: 3934 [ddc7e330, 118] blocked on mutex: [f8bcfa40] {dbs_mutex} .. held by: ondemand: 1462 [f7eb4eb0, 110] ... acquired at: do_dbs_timer+0x13/0x287 [cpufreq_ondemand] This doesn't happen if the govenor is 'userspace', so I'm wondering if we're doing something silly in ondemand when we've offlined a CPU. Any ideas ? Dave -- http://www.codemonkey.org.uk