mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jussi Laako <jussi.laako@kolumbus.fi>
To: mingo@elte.hu
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] improving O(1)-J9 in heavily threaded situations
Date: Thu, 07 Feb 2002 03:10:33 +0200	[thread overview]
Message-ID: <3C61D409.1B9B5895@kolumbus.fi> (raw)
In-Reply-To: <Pine.LNX.4.33.0202061329370.4542-100000@localhost.localdomain>

Ingo Molnar wrote:
> 
> since there is lots of idle CPU time left, the only thing that could make
> a difference is timeslice length.
> to 'fix' this (temporarily), renice all the non-SCHED_FIFO processes to
> nice +19, that will give them the minimum timeslice length.

That caused a "choke" effect of about 10 seconds and then returned back to
normal without visible change.

> again, what does it need to cause the 'bad' situation - too much latency
> in the sound delivery path causing the audio buffers to starve? (or audio
> buffers to be dropped?)

If processes doing read()/write() on socket are not scheduled fast enough it
will cause sender thread in distributor process (SCHED_FIFO) to loose
pthread_cond_*() event for new block of data. This is non-waiting datablock
posting mechanism is made to prevent one hung or otherwise nonresponding
process from affecting other processes dataflow, esp. in SMP systems. So all
the output threads must be back from write() on pthread_cond_wait() before
input thread finishes it's read() and issues pthread_cond_broadcast() for
new datablock. If one of those output threads is not on pthread_cond_wait()
it will of course loose it's datablock.


I made even more testing and found situation where the old scheduler also
does same thing. It seems to be related to processes frequency(/size) of
issuing read()/write() calls on socket. Below _and_ above this frequency
everything works fine. This frequency is a bit lower on old scheduler. So
there is some kind of grey frequency region.


	- Jussi Laako

-- 
PGP key fingerprint: 161D 6FED 6A92 39E2 EB5B  39DD A4DE 63EB C216 1E4B
Available at PGP keyservers


  reply	other threads:[~2002-02-07  1:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-02 15:50 Ed Tomlinson
2002-02-03 11:32 ` Ingo Molnar
2002-02-03 15:46   ` Ed Tomlinson
2002-02-04  0:46     ` Ingo Molnar
2002-02-04 19:52       ` Jussi Laako
2002-02-05  0:59         ` Ingo Molnar
2002-02-04 23:36           ` Jussi Laako
2002-02-05  1:37             ` Ingo Molnar
2002-02-06  0:43               ` Jussi Laako
2002-02-06 12:37                 ` Ingo Molnar
2002-02-07  1:10                   ` Jussi Laako [this message]
2002-02-07 22:28                 ` Ingo Molnar
2002-02-10 15:00                   ` Jussi Laako
2002-02-05  1:41             ` Ingo Molnar
2002-02-03  6:00 Ed Tomlinson
     [not found] <Pine.LNX.4.33.0202040627001.22583-100000@localhost.localdomain>
2002-02-04  4:40 ` Ed Tomlinson
2002-02-04 12:30   ` Ingo Molnar
2002-02-04 12:36   ` Ingo Molnar
2002-02-04 10:47     ` Arjan van de Ven
2002-02-04 14:09       ` Ingo Molnar
2002-02-04 12:18     ` Ed Tomlinson
2002-02-04 20:01   ` Jussi Laako
2002-02-04 22:06     ` Ingo Molnar
2002-02-04 22:56       ` Jussi Laako
2002-02-05  0:56         ` Ingo Molnar
2002-02-04 23:32           ` Jussi Laako
2002-02-05  1:34             ` Ingo Molnar
2002-02-04 22:24   ` Bill Davidsen
2002-02-04 12:32 Ed Tomlinson
2002-02-04 12:33 ` Arjan van de Ven

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=3C61D409.1B9B5895@kolumbus.fi \
    --to=jussi.laako@kolumbus.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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®