Index
Home
About
Blog
From: Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups: fa.linux.kernel
Subject: Re: [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of =
Date: Tue, 09 Jun 2009 15:48:52 UTC
Message-ID: <fa.mQ1boKQ5KAFIMJQ5bEXomNi9Fag@ifi.uio.no>
On Tue, 9 Jun 2009, Rusty Russell wrote:
>
> for_each_online_cpu(i) {
> - if (check_supported_cpu(i))
> + if (work_on_cpu(i, check_supported_cpu, NULL) == 0)
> supported_cpus++;
Please STOP USING THAT HORRIBLE "work_on_cpu()" crap.
Is there any reason you do that? We've had to fix up the fallout from that
kind of crazy crap several times.
Just use a regular IPI. Use "smp_call_function_[single|many]()" instead.
See for example commit 01599fca6758d2cd133e78f87426fc851c9ea725, where
another "work_on_cpu()" thing was broken.
I don't understand why you guys keep on using that _known_ bad function.
The whole point of "work_on_cpu()" is for big, slow, and rare things. Not
as a random "let's make that CPU do this".
So stop it.
Linus
From: Linus Torvalds <torvalds@linux-foundation.org>
Newsgroups: fa.linux.kernel
Subject: Re: [PATCH 4/6] x86/cpufreq: use cpumask_copy instead of =
Date: Tue, 09 Jun 2009 16:42:37 UTC
Message-ID: <fa.xSaUUqc+6uUFvsYhwVYJP85SYQw@ifi.uio.no>
On Tue, 9 Jun 2009, Dave Jones wrote:
>
> work_on_cpu()'s definition could probably use a fat comment describing
> why it sucks.
No, it should be renamed.
The problem is that it _sounds_ like a nice thing to do.
If it was called "slow_other_cpu_thread_switch_with_a_donkey_on_top()", I
bet people wouldn't be so damn eager to use it.
Linus
Index
Home
About
Blog