Doesn't this fly in the face of the whole Two-phase system? It seems to
me that the point was to not require any locks. Preemption disable IS a
lock. Not as strong as some, but a lock none the less.
>
> Pros: easy to implement using a flag (ctx_sw_off() ?)
> Cons: not so easy to use since critical sections need to be clearly
> identified and interfaces defined. also affects preemptive behavior.
>
> 2. In synchronize_kernel(), distinguish between "natural" and preemptive
> schedules() and ignore preemptive ones.
>
> Pros: easy to use
> Cons: Not so easy to implement. Also a low priority task that keeps
> getting
> preempted often can affect update side performance significantly.
Actually is is fairly easy to distinguish the two (see TASK_PREEMPTED in
state). Don't you also have to have some sort of task flag that
indicates that the task is one that needs to sync? Something that gets
set when it enters the area of interest and cleared when it hits the
sync point?
George
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/