Re: 2.6.35-rc1: Call trace: BUG: using smp_processor_id() in preemptible [00000000] code: cpufreq-set/2344 (cpufreq-releated?)

From: Sedat Dilek
Date: Mon May 31 2010 - 02:43:51 EST


Damn!
Sorry, I have found the following fix at cpufreq ML from Dmitry Monakhov [1].

I will try it and report.

- Sedat -

[1] "[PATCH] cpufreq: call nr_iowait_cpu with disabled preemption"
http://www.spinics.net/lists/cpufreq/msg01631.html

On Mon, May 31, 2010 at 8:27 AM, Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> wrote:
> Hi,
>
> with 2.6.35-rc1 I get a cpufreq-related Call trace on startup on a
> 32-bit Debian/sid system.
>
> Below I added (see investigations at the end):
>
> 1. the version of cpufrequtils I am using
> 2. an output of cpufreq-related loaded kernel-modules
> 3. an output of cpufreq-related setting in kernel-config
>
> Furthermore, I have attched the full dmesg output and kernel-config file.
>
> Here is the Call trace:
>
> [ Â 31.647049] BUG: using smp_processor_id() in preemptible [00000000]
> code: cpufreq-set/2344
> [ Â 31.647299] caller is nr_iowait_cpu+0xb/0x1a
> [ Â 31.647303] Pid: 2344, comm: cpufreq-set Not tainted
> 2.6.35-rc1-iniza-686-kms #1
> [ Â 31.647306] Call Trace:
> [ Â 31.647314] Â[<c111fdd9>] ? debug_smp_processor_id+0xa5/0xb8
> [ Â 31.647319] Â[<c1022f93>] ? nr_iowait_cpu+0xb/0x1a
> [ Â 31.647325] Â[<c104a93c>] ? update_ts_time_stats+0x36/0x92
> [ Â 31.647329] Â[<c1045fcb>] ? ktime_get+0x5b/0xd9
> [ Â 31.647333] Â[<c104aae9>] ? get_cpu_idle_time_us+0x36/0x62
> [ Â 31.647340] Â[<f94e433d>] ? get_cpu_idle_time+0x12/0x127 [cpufreq_ondemand]
> [ Â 31.647345] Â[<c10dea11>] ? sysfs_add_file_mode+0x48/0x66
> [ Â 31.647350] Â[<c10e0827>] ? internal_create_group+0xcf/0x134
> [ Â 31.647355] Â[<f94e4a3b>] ? cpufreq_governor_dbs+0xaa/0x2a3
> [cpufreq_ondemand]
> [ Â 31.647361] Â[<c119d94a>] ? __cpufreq_governor+0x2c/0x63
> [ Â 31.647365] Â[<c119e80a>] ? __cpufreq_set_policy+0xea/0x11d
> [ Â 31.647370] Â[<c119ea74>] ? store_scaling_governor+0x58/0x7c
> [ Â 31.647375] Â[<c119ee09>] ? handle_update+0x0/0x8
> [ Â 31.647381] Â[<c1225d70>] ? _raw_spin_unlock_irqrestore+0x22/0x2c
> [ Â 31.647385] Â[<c119ea1c>] ? store_scaling_governor+0x0/0x7c
> [ Â 31.647389] Â[<c119e708>] ? store+0x3c/0x54
> [ Â 31.647393] Â[<c10de76d>] ? sysfs_write_file+0xb8/0xe5
> [ Â 31.647397] Â[<c10de6b5>] ? sysfs_write_file+0x0/0xe5
> [ Â 31.647403] Â[<c109f7c6>] ? vfs_write+0x7f/0xda
> [ Â 31.647408] Â[<c101dad8>] ? do_page_fault+0x1fb/0x25f
> [ Â 31.647412] Â[<c109f8b4>] ? sys_write+0x3c/0x60
> [ Â 31.647417] Â[<c1002e18>] ? sysenter_do_call+0x12/0x28
>
> Hope this helps fixing the problem.
>
> Kind Regards,
> - Sedat -
>
> P.S.:
> Recently I watched a video with a speeh of Greg K-H [1] and extracted
> the maintainers/contributors via:
>
> $ ./scripts/get_maintainer.pl -f drivers/cpuidle/governors/menu.c <---
> nr_iowait_cpu()
> $ ./scripts/get_maintainer.pl -f drivers/cpufreq/cpufreq_ondemand.c
> <--- [cpufreq_ondemand]
>
> [1] Write and Submit your first Linux kernel Patch:
> http://fosdem.org/2010/schedule/events/linuxkernelpatch
>
> ------ INVESTIGATIONS -----
>
> $ env COLUMNS=120 dpkg -l | grep -i cpufreq
> ii Âcpufrequtils       007-1          Âutilities to
> deal with the cpufreq Linux kernel feature
> ii Âlibcpufreq0 Â Â Â Â Â Â Â007-1 Â Â Â Â Â Â Â Â Â Âshared library
> to deal with the cpufreq Linux kernel feature
>
> $ sudo lsmod | grep freq | sort
> acpi_cpufreq      Â4343 Â1
> cpufreq_conservative   6260 Â0
> cpufreq_ondemand    Â5810 Â2
> cpufreq_performance   Â590 Â0
> cpufreq_powersave    Â582 Â0
> cpufreq_stats      1969 Â0
> freq_table       Â1647 Â3 acpi_cpufreq,cpufreq_ondemand,cpufreq_stats
> mperf          Â899 Â1 acpi_cpufreq
> processor       Â22099 Â3 acpi_cpufreq
>
> $ grep -i freq /boot/config-2.6.35-rc1-iniza-686-kms | grep -i cpu
> # CPU Frequency scaling
> CONFIG_CPU_FREQ=y
> CONFIG_CPU_FREQ_TABLE=m
> # CONFIG_CPU_FREQ_DEBUG is not set
> CONFIG_CPU_FREQ_STAT=m
> # CONFIG_CPU_FREQ_STAT_DETAILS is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
> CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
> # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
> # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
> CONFIG_CPU_FREQ_GOV_PERFORMANCE=m
> CONFIG_CPU_FREQ_GOV_POWERSAVE=m
> CONFIG_CPU_FREQ_GOV_USERSPACE=y
> CONFIG_CPU_FREQ_GOV_ONDEMAND=m
> CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
> # CPUFreq processor drivers
> # CONFIG_X86_PCC_CPUFREQ is not set
> CONFIG_X86_ACPI_CPUFREQ=m
> CONFIG_X86_CPUFREQ_NFORCE2=m
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/