Re: [PATCHSET] cpuhog: implement and use cpuhog
From: Tejun Heo
Date: Fri Apr 02 2010 - 01:46:22 EST
On 03/29/2010 06:11 PM, Peter Zijlstra wrote:
> Its a pretty minor difference, shouldn't we simply audit all existing
> kstopmachine users and fix that up, having two similar but not quite
> identical interfaces in the kernel sounds like trouble.
Yeap, sure. I don't think naming one way or the other is a problem
logistics-wise. These aren't very widely used APIs anyway. I've been
thinking quite a while about it and visible interface like the
following would probably fit your suggestion.
* stop_cpu() - identical to hog_cpu()
* stop_cpus() - identical to hog_cpus()
It's just that stop_cpu[s]() don't look like good names because they
don't really stop cpus. This distinction is visible in
implementation. stop_machine()'s per-cpu callback is currently named
stop_cpu() and it adds quite a bit more restrictions on top of just
hogging the cpu. To me, the following visible API seems better.
* stop_machine() - uses stop_cpu() internally for implementation
Oh well, I guess it's a matter of taste. Given that other people
don't dislike the current naming too much, I'll try to push it forward
to Ingo w/ your objection to naming noted.
Thank you for reviewing.
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/