lkml.org 
[lkml]   [2002]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectGarbage on current->state - linux 2.2
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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.048 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site