Re: [patch 1/7] Immediate Values - Architecture Independent Code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mathieu Desnoyers
Date: Wednesday, February 27, 2008 - 12:05 pm

* Jason Baron (jbaron@redhat.com) wrote:

Ok, I see why you did it that way. Comments follow inline.

[...]
 
[...]

Why do we now have to declare this static ? Can we pass it as a pointer
to stopmachine instead ?


Hrm, the semantic of STOPMACHINE_RUN is a bit weird :
- The CPU where the do_stop thread runs will first execute (alone) the
  callback.
- Then, all the other CPUs will execute the callback concurrently.

Given that you use a "started" boolean in the callback, which is ok as
long as there is no concurrent modification (correct given the current
semantic, but fragile), I would tend to document that the first time the
callback is called, it is ran alone, without concurrency, and then all
the other callbacks are ran concurrently.



missing mb() comment here.


Note : we really want the sync_core()s to be executed after the
text_poke. This is ok given the implicit RUN_ALL semantic, but I guess
it should be documented in stop_machine that the first callback is
executed alone before all the others.

Thanks!

Mathieu


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 1/7] Immediate Values - Architecture Independent Code, Mathieu Desnoyers, (Sat Feb 2, 2:08 pm)
Re: [patch 1/7] Immediate Values - Architecture Independen ..., Mathieu Desnoyers, (Tue Feb 26, 4:12 pm)
Re: [patch 1/7] Immediate Values - Architecture Independen ..., Mathieu Desnoyers, (Tue Feb 26, 4:34 pm)
Re: [patch 1/7] Immediate Values - Architecture Independen ..., Mathieu Desnoyers, (Wed Feb 27, 12:05 pm)
[patch 1/2] add ALL_CPUS option to stop_machine_run(), Jason Baron, (Thu Feb 28, 9:33 am)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Max Krasnyanskiy, (Thu Feb 28, 3:09 pm)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Mathieu Desnoyers, (Thu Feb 28, 3:14 pm)
Re: [patch 2/2] implement immediate updating via stop_mach ..., Mathieu Desnoyers, (Fri Feb 29, 6:43 am)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Max Krasnyanskiy, (Fri Feb 29, 11:24 am)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Max Krasnyanskiy, (Fri Feb 29, 12:58 pm)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Max Krasnyanskiy, (Mon Mar 3, 5:30 pm)
Re: [patch 1/2] add ALL_CPUS option to stop_machine_run(), Max Krasnyansky, (Mon Mar 3, 9:11 pm)