linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Christoph Hellwig <hch@sgi.com>,
	marcelo@connectiva.com.br.munich.sgi.com, rml@tech9.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] set_cpus_allowed() for 2.4
Date: Mon, 02 Dec 2002 11:30:05 -0800	[thread overview]
Message-ID: <3DEBB4BD.F64B6ADC@digeo.com> (raw)
In-Reply-To: 1919608311.1038822649@[10.10.2.3]

"Martin J. Bligh" wrote:
> 
> > now that all commercial vendors ship a backport of Ingo's O(1)
> > scheduler external projects like XFS have to track those projects
> > in addition to the mainline kernel.
> 
> There was talk of merging the O(1) scheduler into 2.4 at OLS.
> If every distro has it, and 2.5 has it, and it's been around for
> this long, I think that proves it stable.
> 

I have observed two problems with the new scheduler, both serious IMO:

1) Changed sched_yield() semantics.  sched_yield() has changed
   dramatically, and it can seriously impact existing applications.
   A testcase (this is on 2.5.46, UP, no preempt):

   make -j3 bzImage
   wait 30 seconds
   ^C
   make clean	(OK, it's all in cache)
   start StarOffice 5.2
   make -j3 bzImage
   wait 5 seconds
   now click on the SO5.2 `File' menu.

   It takes ~15 seconds for the menu to appear, and >30 seconds for
   it to go away.  The application is wholly unusable for the duration
   of the compilation.

   This is because StarOffice is spinning on sched_yield().  Rumour has
   it that this is happening inside the pthread library.

   This will affect other things, both in-kernel and out.  This includes
   ext3, which uses yield() in its transaction batching.  ext3's fsync()
   operation performs dreadfully with the new yield() if there are
   compute-intensive things happening at the same time.  If people are
   shipping that sched_yield() implementation without having changed ext3,
   then they will receive bug reports against this.

   Arguably, the new sched_yield() is correct and the old one wasn't,
   but the effects of this change make it unsuitable for a 2.4 merge.

2) The interactivity estimator makes inappropriate decisions.

   Test case:

   start a kernel compile as above
   grab an xterm and waggle it about a lot.

   The amount of waggling depends on the video hardware (I think).  One
   of my machines (nVidia NV15) needs a huge amount of vigorous waggling.
   Another machine (voodoo III) just needs a little waggle.

   When you've waggled enough, the scheduler decides that the X server
   is a `batch' process and schedules it alongside the background
   compilation.  Everything goes silly.  The mouse cursor sticks stationary
   for 0.5-1.0 seconds, then takes great leaps across the screen.  Unusable.
   You have to stop using the machine for five seconds or so, wait for the
   X server to flip back into `interactive' mode.

   This also affects netscape 4.x mailnews.  Start the kernel compile,
   then select a new (large) folder.  Netscape will consume maybe one
   second CPU doing the initial processing on that folder, which is
   enough for the system to decide it's a "batch" process.  The user
   interface seizes up and you have to wait five seconds for it to be
   treated as an "interactive" process again before you can do anything.

   It also affects gdb.  Start a kernel compile, then run `gdb vmlinux'.
   The initial processing which gdb does on the executable is enough for it
   to be treated as a batch process and the subsequent interactive session
   is comatose for several seconds.  Same deal.

   This one needs fixing in 2.5.  Please.  It's very irritating.

  parent reply	other threads:[~2002-12-02 19:22 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-03  0:26 [PATCH] set_cpus_allowed() for 2.4 Christoph Hellwig
2002-12-02 17:24 ` Jeff Garzik
2002-12-02 18:57   ` Robert Love
2002-12-03  0:51   ` Christoph Hellwig
2002-12-02 17:50 ` Martin J. Bligh
2002-12-02 18:50   ` Adrian Bunk
2002-12-02 19:12     ` Robert Love
2002-12-02 19:30   ` Andrew Morton [this message]
2002-12-02 19:50     ` Andrea Arcangeli
2002-12-03 20:49       ` Andrew Morton
2002-12-03 21:09         ` Martin J. Bligh
2002-12-04  0:09           ` Andrea Arcangeli
2002-12-04  0:06         ` Andrea Arcangeli
2002-12-04  0:30           ` Andrew Morton
2002-12-04  0:42             ` Andrea Arcangeli
2002-12-04  1:03               ` William Lee Irwin III
2002-12-04  9:25                 ` William Lee Irwin III
2002-12-04  1:14               ` Andrew Morton
2002-12-04  1:21                 ` Andrea Arcangeli
2002-12-04  2:14                   ` Andrew Morton
2002-12-06 18:11                 ` William Lee Irwin III
2002-12-08 13:23     ` Ingo Molnar
2002-12-08 19:56       ` Andrew Morton
2002-12-09 20:13         ` Ingo Molnar
2002-12-03  1:11   ` Christoph Hellwig
2002-12-02 18:59     ` Robert Love
2002-12-02 22:47     ` Alan Cox
2002-12-02 22:38       ` Christoph Hellwig
2002-12-02 22:41         ` Robert Love
2002-12-07 16:55           ` bill davidsen
  -- strict thread matches above, loose matches on Subject: below --
2002-12-13 23:08 Christoph Hellwig
2002-12-13 21:34 ` Adrian Bunk
2002-12-14  4:55   ` Christoph Hellwig
2002-12-09 20:19 kernel
2002-12-09  3:02 Jim Houston
2002-10-01 23:03 Robert Love
2002-10-02 13:01 ` Christoph Hellwig
2002-10-02 15:00   ` Robert Love
2002-11-05  3:37 ` Christoph Hellwig
2002-11-06 15:32   ` Adrian Bunk
2002-11-07 21:42     ` Christoph Hellwig
2002-12-02 17:12   ` Mikael Pettersson
2002-12-03  0:51     ` Christoph Hellwig
2002-12-02 17:47       ` Mikael Pettersson
2002-12-02 19:10         ` Robert Love

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=3DEBB4BD.F64B6ADC@digeo.com \
    --to=akpm@digeo.com \
    --cc=hch@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@connectiva.com.br.munich.sgi.com \
    --cc=mbligh@aracnet.com \
    --cc=rml@tech9.net \
    /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;
as well as URLs for NNTP newsgroup(s).