Garbage on current->state - linux 2.2

From: Luciano Porto Barreto (barreto@labri.fr)
Date: Wed Feb 20 2002 - 12:23:02 EST


Hi,

We are developing a package (named Bossa) to allow developers to safely
and easily program their own schedulers.
This package will be available as soon as we get a stable version and we
plan to port it to more recent versions (2.4, 2.5).

Schedulers react to events that are generated by the kernel at specific
parts (eg, when a process blocks or unblocks). We have instrumented the
kernel (2.2.16 non SMP) to notify such events.

We added a field (pointer to a struct) at the end of
task_struct (the usual approach).

We also replaced schedule() by the following skeleton.

schedule()
{ int s_state;
          event_struct *e;
          ...
          // bottom half processing
          ...
          while ((e = bossa_get_next_event()) != NULL)
            {
             need_to_switch = handle_event(e);
            }
         if (need_to_switch)
           { // selects the new process
                   get_mmu_context(new);
                switch_to(old,new,old);
           }
}
        
However, sometimes I get garbage when reading current->state (eg, in
wake_up_process() ). Such garbage appears after the switch_to.

Any hints of what may be causing that ?

Thanks,

Luciano
-
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/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:25 EST