lkml.org 
[lkml]   [2010]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHSET] cpuhog: implement and use cpuhog
Hello, Peter.

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()
* stop_machine()

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.

* hog_cpu()
* hog_cpus()
* 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.

--
tejun


\
 
 \ /
  Last update: 2010-04-02 07:49    [W:0.070 / U:2.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site