Re: Module loading/unloading and "The Stop Machine"

From: Rusty Russell
Date: Mon Mar 03 2008 - 22:52:21 EST


On Thursday 14 February 2008 16:02:06 Jike Song wrote:
> On 2/8/08, Max Krasnyansky <maxk@xxxxxxxxxxxx> wrote:
> > Hi Rusty,
> >
> > I was hopping you could answer a couple of questions about module
> > loading/unloading and the stop machine.
>
> I'm curious to know why it is called `stop machine', which is a queer
> name without any relationship with its function.

Hi Jike,

I'm surprised.. stunned even, to hear you say this. stop_machine stops the
machine: every CPU is frozen with interrupts disabled. I am having trouble
thinking of a better name.

"schedule_a_thread_on_every_cpu_and_then_disable_interrupts" is a little
long, and describes the implementation not the effect.

"run_and_make_sure_no_cpus_have_preempt_disabled" also fails the "will Linus
flame me?" test, I think.

"freeze_machine" has connotations of the freezer, which is completely
different from this. "do_machine" is shorter, but sounds vaguely naughty.

> Regards,
> Jike

Perhaps you were angling for "jike_machine"? It's kind of catchy, but I don't
think that patch will be accepted even if you pushed it as a git tree.

Cheers,
Rusty.
--
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/