public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luciano Porto Barreto <barreto@labri.fr>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Garbage on current->state - linux 2.2
Date: Wed, 20 Feb 2002 18:23:02 +0100	[thread overview]
Message-ID: <3C73DB76.3A3E73F7@labri.fr> (raw)

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

                 reply	other threads:[~2002-02-20 17:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C73DB76.3A3E73F7@labri.fr \
    --to=barreto@labri.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox