On Friday, 20 April 2007 13:05, Gautham R Shenoy wrote:
Actually, I thought about it for a while. The thread that is going to stop
another one may temporarily mark itself as freezable in all cases, which
will have no effect on it, since it's not going to cally try_to_freeze(), but
will make the freezer wait for it. Next, after returning from
wait_for_completion(), it should restore its old freezability status and that
should make the freezer finish.
Well, I think it might be simpler to consider each case separately. This way
we may be able to avoid introducing the additional TIF_ flag.
Sure. :-)
BTW, if it turns out that we need to introduce yet another freezer-related
TIF_ flag, it may be acceptable (?) to move all of the freezer-related flags
into a separate member of task_struct (eg. freezer_flags) that can only be
manipulated under task_lock().
I mean, we already have four of them (PF_NOFREEZE, PF_FROZEN,
PF_FREEZER_SKIP, TIF_FREEZE), and you will need to introduce two more for
the freezer-based CPU hotplug, so if yet another one is needed, that will make
up almost a separate u8 field ...
Greetings,
Rafael
-