All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Tim Connors <tconnors+linuxkernel1080972247@astro.swin.edu.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: solved (was Re: xterm scrolling speed - scheduling weirdness in 	2.6 ?!)
Date: Sat, 3 Apr 2004 15:11:12 +0100	[thread overview]
Message-ID: <20040403141112.GD4706@mail.shareable.org> (raw)
In-Reply-To: <slrn-0.9.7.4-25410-10302-200404031604-tc@hexane.ssi.swin.edu.au>

Tim Connors wrote:
> So this is much like the xterm situation - 2 CPU chewing things,
> interacting with a third short lived low CPU job (ls or some
> wwwoffle fork) that the other two are relying on (mozilla and xterm
> directly, X indirectly)
> 
> This is my reason for not thinking this is an xterm bug. The scheduler
> looks inherently fragile.

It looks like scheduler fragility to me too.

I see the same with Gnome Terminal.  Most of the time, ls or cat are
fast, with jump scrolling.  But occasionally they are much slower.

There are two stable scheduling modes here - rapid switching with a
few characters moved, or slow switching with lots of characters moved.

We'd like the former to decay spontaneously to the latter, quickly.

I like the observation that the terminal program can solve this
problem by introducing a short delay after receiving a few bytes.
However, that's not feasible for X itself, which must draw things very
soon after receiving the commands so that animations are smooth when
that's intended, which happens when a client deliberately sleeps
rather than being preempted by having just sent a command to X.

I think the problem is that the scheduler is aggressively preempting a
task which has just written through a pipe/terminal/socket, when the
task at the other end becomes ready to run as a result.

If the writing task is still runnable, usually you want the writing
task to continue for a little while more.  The scheduler is getting
that right most times on my box with ls+Gnome Terminal+X, but
occasionally gets stuck in a mode where it consistently gets it wrong
until all the programs become idle again.  Then it recovers.
This mode is quite rare, once every few days.

> To help you work out my datapoint in relation to someone elses, my box
> is a 500MHz AMD KII, now running 2.6.4. The video card is in no way
> accelarated (crappy old nvidia card), so X likes to chew CPU easily.

Dual Athlon 1500 MHz, Matrox Millenium video card.

-- Jamie

  reply	other threads:[~2004-04-03 14:11 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44.0401031439060.24942-100000@coffee.psychology.mcmaster.ca>
2004-01-03 20:19 ` xterm scrolling speed - scheduling weirdness in 2.6 ?! Soeren Sonnenburg
2004-01-03 21:00   ` Con Kolivas
2004-01-03 21:10     ` Soeren Sonnenburg
2004-01-03 21:15       ` Con Kolivas
2004-01-03 23:35         ` Willy Tarreau
2004-01-04  0:11           ` Soeren Sonnenburg
2004-01-04  1:42           ` Con Kolivas
2004-01-04  3:32             ` Tim Connors
2004-01-04  5:58               ` Con Kolivas
2004-01-06  1:09                 ` Peter Osterlund
2004-01-06  1:37                   ` Nick Piggin
2004-01-06  2:28                     ` Peter Osterlund
2004-01-06  2:50                       ` Nick Piggin
2004-01-06  6:27                       ` Nick Piggin
2004-01-05 22:25               ` Bryan Whitehead
2004-01-04  8:09             ` Soeren Sonnenburg
2004-01-04  8:49               ` Con Kolivas
2004-01-04 11:13                 ` Martin Schlemmer
2004-01-04 11:24                   ` Soeren Sonnenburg
2004-01-04 12:45                   ` Con Kolivas
2004-01-04 14:42                     ` Martin Schlemmer
2004-01-04 18:40                       ` mikeg
2004-01-04 22:58                       ` szonyi calin
2004-01-04 23:33                         ` Willy Tarreau
2004-01-04 23:44                           ` Valdis.Kletnieks
2004-01-04 23:47                           ` Mike Fedyk
2004-01-05  8:39                             ` Soeren Sonnenburg
2004-01-05 20:38                               ` Martin Schlemmer
2004-01-05  9:18                             ` Soeren Sonnenburg
2004-01-05 17:20                               ` Martin Schlemmer
2004-01-05 17:21                                 ` Willy Tarreau
2004-01-05  9:50                             ` Kenneth Johansson
2004-01-05 10:17                               ` Soeren Sonnenburg
2004-04-02 18:22                               ` solved (was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!) Soeren Sonnenburg
2004-04-03  5:35                                 ` Tim Connors
2004-04-03  6:06                                   ` Tim Connors
2004-04-03 14:11                                     ` Jamie Lokier [this message]
2004-01-05  8:26                         ` xterm scrolling speed - scheduling weirdness in 2.6 ?! Soeren Sonnenburg
2004-01-04  8:54               ` Lincoln Dale
2004-01-04  9:17                 ` Nick Piggin
2004-01-04 10:24                   ` Soeren Sonnenburg
2004-01-04 11:12                     ` Mike Fedyk
2004-01-04 11:17                       ` Soeren Sonnenburg
2004-01-04 11:20                         ` Mike Fedyk
2004-01-04 11:19                       ` Willy Tarreau
2004-01-05  0:48                         ` Nick Piggin
2004-01-04 11:46                   ` Nicks's scheduler's OK [was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!] Willy Tarreau
2004-01-04 12:07                   ` xterm scrolling speed - scheduling weirdness in 2.6 ?! Willy Tarreau
2004-01-05  0:51                     ` Nick Piggin
2004-01-05 18:37                       ` Willy Tarreau
2004-01-06  0:33                         ` Nick Piggin
2004-01-04 10:11                 ` Soeren Sonnenburg
2004-01-05 10:31                   ` venom
2004-01-03 21:18     ` Willy Tarreau
2004-04-03 20:53 solved (was Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!) Soeren Sonnenburg

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=20040403141112.GD4706@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tconnors+linuxkernel1080972247@astro.swin.edu.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.