public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bernardo Innocenti <bernie@develer.com>
To: Arjan van de Ven <arjanv@redhat.com>
Cc: Development discussions related to Fedora Core 
	<fedora-devel-list@redhat.com>,
	Nalin Dahyabhai <nalin@redhat.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Arjan van de Ven <arjanv@redhat.com>
Subject: RFA: Changing scheduler quantum (Was: REQUEST: OpenLDAP 2.3.7)
Date: Sun, 18 Sep 2005 13:37:35 +0200	[thread overview]
Message-ID: <432D517F.2000604@develer.com> (raw)
In-Reply-To: <20050918110524.GA23910@devserv.devel.redhat.com>

Arjan van de Ven wrote:

> On Sun, Sep 18, 2005 at 04:27:38AM +0200, Bernardo Innocenti wrote:
> 
>>It's more meaningful to interpret sched_yield() as "give up the processor,
>>as if the scheduler quantum had expired".
> 
> afaik this is *exactly* what the new sched_yield() does ;)

Oops :-)


>>The scheduler wouldn't normally allow a lower priority process to
>>preempt a high-priority ready process for 30+ ms.  Unless I'm
>>mistaken about Linux's scheduling policy...
> 
> if your quantum is up... all other tasks get theirs of course

I assumed dynamic priorities affected the length of the
quantum, but maybe it just changes the number of times
the process is scheduled wrt other processes, with the
quantum being fixed at 20-30ms.

(...a few seconds later...)

Skimming through sched.c, it seems my first guess was
right: the quantum varies with the priority from 5ms
to 800ms.

The DEF_TIMESLICE of 400ms looks a bit too gross for
most applications and the maximum 800ms is just
ridicolously high.

IIRC, the 7.14MHz 68000 in the Amiga 500 did task-switching
at 20ms intervals, with a negligible performance hit.
Couldn't do much better on today's CPUs?

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/


       reply	other threads:[~2005-09-18 11:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <432B9F4A.6070805@develer.com>
     [not found] ` <1126982265.3010.12.camel@localhost.localdomain>
     [not found]   ` <432CBABC.8090906@develer.com>
     [not found]     ` <20050918013247.GA31974@devserv.devel.redhat.com>
     [not found]       ` <432CD09A.2060201@develer.com>
     [not found]         ` <20050918110524.GA23910@devserv.devel.redhat.com>
2005-09-18 11:37           ` Bernardo Innocenti [this message]
2005-09-18 11:44             ` RFA: Changing scheduler quantum (Was: REQUEST: OpenLDAP 2.3.7) Con Kolivas
2005-09-18 21:53               ` Bernardo Innocenti
2005-09-19  0:46                 ` Con Kolivas

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=432D517F.2000604@develer.com \
    --to=bernie@develer.com \
    --cc=arjanv@redhat.com \
    --cc=fedora-devel-list@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nalin@redhat.com \
    /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