From: Pavel Machek Subject: PREEMPT problems in cpufreq/powernow-k8 Date: Tue, 1 Jun 2004 15:15:53 +0200 Sender: cpufreq-bounces@www.linux.org.uk Message-ID: <20040601131552.GA614@elf.ucw.cz> Mime-Version: 1.0 Return-path: Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cpufreq-bounces+glkc-cpufreq=gmane.org@www.linux.org.uk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: paul.devriendt@amd.com, Cpufreq mailing list , kernel list Hi! I enabled CONFIG_PREEMPT to test swsusp, and it uncovered some problems with powernow-k8: md: Autodetecting RAID arrays. md: autorun ... md: ... autorun DONE. VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 204k freed Debug: sleeping function called from invalid context at include/linux/rwsem.h:43 in_atomic():1, irqs_disabled():0 Call Trace: [] __might_sleep+0xaa/0xb8 [] cpufreq_notify_transition+0x32/0x168 [] transition_frequency+0xa1/0x104 [] powernowk8_target+0xdb/0x130 [] __cpufreq_driver_target+0x1b/0x20 [] cpufreq_governor_performance+0x1e/0x24 [] __cpufreq_governor+0x6e/0x10c [] __cpufreq_set_policy+0x139/0x144 [] cpufreq_set_policy+0x4d/0x94 [] cpufreq_proc_write+0x9e/0xb8 [] handle_mm_fault+0xc8/0x134 [] do_page_fault+0x13f/0x4fb [] do_page_fault+0x0/0x4fb [] proc_file_write+0x27/0x34 [] vfs_write+0xa0/0xd0 [] sys_write+0x31/0x4c [] syscall_call+0x7/0xb Adding 1051304k swap on /dev/hda1. Priority:-1 extents:1 powernowk8_target does preempt_disable(), and that calls cpufreq_notify_transition(). That does down(). Ouch. Hmm, but on SMP systems frequency really should be changed with preempt_disable. How to deal with that? Pavel [Plus I get some more warnings during swsusp, all seem to be powernow-k8 related...] -- 934a471f20d6580d5aad759bf0d97ddc