mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: frankeh@us.ibm.com
Cc: alan@lxorguk.ukuu.org.uk (Alan Cox @vger.kernel.org),
	ddade@digitalstatecraft.com, linux-kernel@vger.kernel.org
Subject: Re: Is it bad to have lots of sleeping tasks?
Date: Mon, 27 Aug 2001 20:18:39 +0100 (BST)	[thread overview]
Message-ID: <E15bRuB-0004Uc-00@the-village.bc.nu> (raw)
In-Reply-To: <3B8A88B0.FDCC5ACE@watson.ibm.com> from "Hubertus Franke" at Aug 27, 2001 01:51:44 PM

> Alan is right, I would not be too concerned about the recalculate
> loop. There are patches out that would basically eliminate the
> update of all tasks during recalculate, but they come at an additional
> cost during add_from_runqueue and del_from_runqueue. I don't know
> exactly where the break-even point is where either solution is
> worse of better.

The overhead will be pretty close to zero since the update will be for a
task that is in local cache, so its a tiny bit of math from L1 cache with
writes that don't cause stalls.

> We presented this stuff at OLS and since then have improved the
> low running-thread count scenario.

> The MQ is functionally equivalent to the current scheduler

This is one of the things I think we have wrong although I understand
keeping the behaviour was part of the goal of your code. The scheduler
should be cache optimising for cpu soakers at least. That also seems
to simplify the scheduler not make it more complex.

For example we tend to schedule events badly - consider processes A and B
and are CPU suckers and an editor. Each time you hit a key and wake the
editor you tend to flip between running A and B. 

I'd like to see us end up with an O(1) [for hardware ffz at least] scheduler
that did the right things for cache locality. I've got some ideas but I
don't know how to make them work SMP.

> Alan, could you suggest some benchmarks to run for 2-way systems,
> that have low thread counts, are easily reproducable (no big setup and
> large system configuration required) that would help us make the point
> for a larger set of application then we have targetted.

Lmbench can be useful for small scale numbers, although it isnt intended
currently to measure SMP. Perhaps Larry can comment on that.

We certainly both agree the scheduler needs work

Alan

       reply	other threads:[~2001-08-27 19:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3B8A88B0.FDCC5ACE@watson.ibm.com>
2001-08-27 19:18 ` Alan Cox [this message]
2001-08-24 19:39 Donald Dade
2001-08-24 20:05 ` Alan Cox
2001-08-24 20:13   ` Hua Zhong
2001-08-24 20:32     ` Kurt Garloff
2001-08-24 21:19       ` Alan Cox
2001-08-24 21:15     ` Alan Cox

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=E15bRuB-0004Uc-00@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=ddade@digitalstatecraft.com \
    --cc=frankeh@us.ibm.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

all inboxes | Powered by JetHome®