[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0904131648290.26713@localhost.localdomain>
Date: Mon, 13 Apr 2009 16:50:45 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Ingo Molnar <mingo@...e.hu>, Valdis.Kletnieks@...edu,
Mike Travis <travis@....com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
mm-commits@...r.kernel.org, Rusty Russell <rusty@...tcorp.com.au>,
Dave Jones <davej@...hat.com>, Len Brown <lenb@...nel.org>
Subject: Re: mmotm 2009-04-10-02-21 uploaded - forkbombed by work_for_cpu
So I applied this (commit 01599fca6758d2cd133e78f87426fc851c9ea725:
"cpufreq: use smp_call_function_[single|many]() in acpi-cpufreq.c"), but
just realized - because of a compiler warning - that this looks
suspicious:
On Mon, 13 Apr 2009, Andrew Morton wrote:
> @@ -283,7 +280,7 @@ static unsigned int get_measured_perf(st
> unsigned int perf_percent;
> unsigned int retval;
>
> - if (!work_on_cpu(cpu, read_measured_perf_ctrs, &readin))
> + if (smp_call_function_single(cpu, read_measured_perf_ctrs, &cur, 1))
> return 0;
>
> cur.aperf.whole = readin.aperf.whole -
How and why did that "read_measured_perf_ctrs, &readin" become
"read_measured_perf_ctrs, &cur" when the work_on_cpu() was converted to
"smp_call_function_single()"?
Looks like a bug. But such an odd one that I wonder whether there was some
thought behind it? Andrew?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists