public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmail.virusscreen.com>
To: linux-kernel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: system call sched_yield() doesn't work on Linux 2.2
Date: Sun, 4 Feb 2001 22:03:31 -0800	[thread overview]
Message-ID: <01020422033100.09580@ewok.dev.mycio.com> (raw)
In-Reply-To: <20010205162903.A15507@ftoomsh.progsoc.uts.edu.au>
In-Reply-To: <20010205162903.A15507@ftoomsh.progsoc.uts.edu.au>

On Sunday 04 February 2001 21:50, Matt wrote:
> in this case you will see that in 2.2.18 a SCHED_YIELD process will
> get a "goodness" value of 0, however in 2.4.1-ac1 you will find that
> it gets a value of -1 (and hence a lower scheduling priority). i dont
> have a machine handy that is running 2.2.18 that i can patch and
> reboot, how ever you may wish to change the return value on line 119
> of kernel/sched.c in 2.2.18 to -1 and you may find that it might give
> the behaviour you are looking for. it may also cause other
> problems. caveat emptor and all that..

I don't have a copy of POSIX 1003.1 (Realtime Extensions) with me now but if 
I remember well this states that sched_yield() should release the CPU to 
other threads with the same priority and never schedule task with lower ones.
Now, if for priority We mean static priority the current behaviour of 2.4.x 
is correct, but if We mean dynamic priority the current implementation does 
not respect the standard.
This coz the goodness() for that task will return -1, and this will make this 
process a loser even compared to ones with lower ( dynamic ) priority.
If the POSIX standard concept of priority is nearest to the dynamic one, 
probably a better solution would be a move_last_runqueue + clean_yield_flag.
Not that this will change the universe anyway ...



- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2001-02-05  6:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-05  5:29 system call sched_yield() doesn't work on Linux 2.2 Matt
2001-02-05  6:03 ` Davide Libenzi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-05  7:27 Mohit Aron
2001-02-05  4:33 Robert Guerra
2001-02-05 20:03 ` David Schwartz
2001-02-05  4:02 Mohit Aron
2001-02-05 16:49 ` Rik van Riel
2001-02-04 17:45 Mohit Aron
2001-02-05  0:21 ` David Schwartz
2001-02-03 22:53 Mohit Aron
2001-02-04 11:08 ` David Schwartz

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=01020422033100.09580@ewok.dev.mycio.com \
    --to=davidel@xmail.virusscreen.com \
    --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