mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: safemode <safemode@speakeasy.net>
To: Roger Larsson <roger.larsson@norran.net>, Robert Love <rml@tech9.net>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Preemption Latency Measurement Tool
Date: Sat, 22 Sep 2001 21:42:02 -0400	[thread overview]
Message-ID: <20010923014156Z272552-760+15680@vger.kernel.org> (raw)
In-Reply-To: <Pine.LNX.4.30.0109201659210.5622-100000@waste.org> <200109222340.BAA37547@blipp.internet5.net> <200109230042.f8N0gw129012@mailf.telia.com>
In-Reply-To: <200109230042.f8N0gw129012@mailf.telia.com>

On Saturday 22 September 2001 20:38, Roger Larsson wrote:
> On Sunday 23 September 2001 01.40, safemode wrote:
> > ok. The preemption patch helps realtime applications in linux be a little
> > more close to realtime.  I understand that.  But your mp3 player
> > shouldn't need root permission or renicing or realtime priority flags to
> > play mp3s. To test how well the latency patches are working you should be
> > running things all at the same priority.  The main issue people are
> > having with skipping mp3s is not in the decoding of the mp3 or in the
> > retrieving of the file, it's in the playing in the soundcard.  That's
> > being affected by dbench flooding the system with irq requests.  I'm
> > inclined to believe it's irq requests because the _only_ time i have
> > problems with mp3s (and i dont change priority levels) is when A. i do a
> > cdparanoia -Z -B "1-"    or dbench 32.   I bet if someone did these tests
> > on scsi hardware with the latency patch, they'd find much better results
> > than us users of ide devices.
>
> No, irq might have something to do with it but it is unlikely since the
> stops are too long.
>
> Much more likely is:
> a) when running without priority altered:
> MP3 playing requires processing, this will lower the process priority
> relative processes that does little processing - like dbench processes.
> Running with negative nice will help this, but is no guarantee. Running
> with RT priority is.
> [this is where the various low latency patches helps]

I dont think mp3 playing should require realtime priority.  if the problem is 
not getting enough cpu time or attention from the kernel then it's a kernel 
scheduling problem.  You shouldn't have to "cheat" and bypass all that.  in 
an ideal situation the kernel should be able to see that the mp3 proccess is 
running and is thus more important than stuff like dbench proccesses.  
Although this problem we're having with mp3 skippage is not a cpu bound 
problem.  We're dealing with another resource here that's not so predictable 
because the kernel scheduling handles cpu time slices very nicely.  


> b) several processes are doing disk operations simultaneously.
> This will put preassure on the VM to free pages fast enough. It will
> also put preassure on the disk IO to read from disk fast enough -
> these requests are not prioritized with the process priority in mind.
> If there are no pages free we have to wait...
> [if you run the latencytest program with no audiofile, to use a sine,
>  you will not hear dropouts... it runs with RT prio with resident memory]

this may be the reason.  Although i dont think RT prio has anything to do 
with it.  If RT prio doesn't effect this VM portion of the kernel then wether 
we use RT or not for something as tiny as mp3 playing would hardly matter.  
Our sound drivers may not be able to play nicely with the VM under heavy disk 
access like cdparanoia -Z or dbench 32 and above.  


> This second problem is MUCH harder to solve.
> Multimedia applications could reserve memory - for their critical code
> including buffers... (but this will require suid helpers...)
> SGIs filesystem XFS is said to be able to guarantee bandwith to an
> application.
>
> Riels schedule in __alloc_pages probably helps the case with competing
> regular processes a lot. Not allowing memory allocators to run their
> whole time slot. The result should be a way to prioritize memory allocs
> relative your priority. (yield part might be possible/good to remove)

Sounds interesting. 
> /RogerL

Setting to RT should guarantee that your process gets executed when it wants 
to and processed by the kernel, which should help when dealing with something 
that holds on to a part of the kernel for an unpredictable amount of time or 
perhaps just a length of time that's too long.  But this vm scheduling thing 
that can break up those requests should allow the kernel to organize more of 
it's processes to be able to run smoothly at the same time without the need 
to give one higher priority than the other. Perhaps making a default alloc 
time slot that's small so no processes get accidentally starved and if you 
want a program that hogs memory time to run at full performance and not be 
hampered by multitasking, running at a higher priority would increase it's 
mem alloc time.   mp3 playing requires a very minimal amount of resources 
from anything.  it should be made that these minimal programs can run 
smoothly without resource hogging programs starving them unless you 
specificaly want them to (ie. increase priority).  

  reply	other threads:[~2001-09-23  1:42 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200109200758.f8K7wEG13675@zero.tech9.net>
2001-09-19 22:44 ` Robert Love
2001-09-20  1:40   ` Ignacio Vazquez-Abrams
2001-09-20  2:23     ` safemode
2001-09-20  1:13       ` David Lang
2001-09-20  2:57         ` Robert Love
2001-09-20  2:38     ` Robert Love
2001-09-20  6:31   ` Dieter Nützel
2001-09-20  6:31   ` Dieter Nützel
     [not found]   ` <20010920063143.424BD1E41A@Cantor.suse.de>
2001-09-20  6:41     ` Andrea Arcangeli
2001-09-20  7:57       ` Dieter Nützel
2001-09-20 21:09       ` Robert Love
     [not found]       ` <20010920075751.6CA791E6B2@Cantor.suse.de>
2001-09-20  8:21         ` Andrea Arcangeli
2001-09-20 20:13           ` george anzinger
2001-09-20 20:38             ` Randy.Dunlap
2001-09-20 21:10         ` Robert Love
2001-09-20 21:35           ` Dieter Nützel
2001-09-20 22:03             ` Oliver Xymoron
2001-09-20 22:51               ` Dieter Nützel
2001-09-21  3:17               ` Robert Love
2001-09-21 15:48                 ` george anzinger
2001-09-22 21:09                   ` Dieter Nützel
2001-09-22 23:40                     ` safemode
2001-09-22 23:46                     ` Dieter Nützel
2001-09-23  0:15                     ` safemode
2001-09-23  0:42                     ` Dieter Nützel
2001-09-23  2:50                     ` Robert Love
2001-09-23  3:14                       ` george anzinger
2001-09-23  4:06                         ` Dieter Nützel
2001-09-23  2:54                     ` Robert Love
2001-09-27  0:02                       ` [reiserfs-list] " Dieter Nützel
2001-09-23  2:58                     ` Robert Love
     [not found]                     ` <200109222340.BAA37547@blipp.internet5.net>
2001-09-23  0:38                       ` Roger Larsson
2001-09-23  1:42                         ` safemode [this message]
2001-09-23  3:02                       ` Robert Love
2001-09-23 16:43                         ` Roger Larsson
2001-09-23  2:44                   ` Robert Love
     [not found]       ` <200109200757.JAA60995@blipp.internet5.net>
2001-09-20 17:37         ` Roger Larsson
2001-09-20 21:29         ` Robert Love
2001-09-20 21:53           ` Dieter Nützel
2001-09-20 20:01   ` Tobias Diedrich
2001-09-20 20:27   ` Robert Love
2001-09-20 22:09     ` [PATCH] Preemption patch 2.4.9-ac12 Robert Love
2001-09-20 22:01   ` [PATCH] Preemption Latency Measurement Tool Robert Love
2001-09-22  3:57   ` Andre Pang
2001-09-22  6:10   ` Robert Love
2001-09-22  7:22     ` Andre Pang
2001-09-23  3:18       ` george anzinger
2001-09-23  3:21       ` Robert Love
2001-09-22 12:56     ` ksoftirqd? (Was: Re: [PATCH] Preemption Latency Measurement Tool) Roger Larsson
2001-09-22 13:14       ` Andrea Arcangeli
2001-09-22 20:51         ` Roger Larsson
2001-09-22 21:33           ` Andrea Arcangeli
2001-09-23  7:05     ` [PATCH] Preemption Latency Measurement Tool Robert Love
2001-09-23 12:03       ` Andre Pang
2001-09-23 18:31       ` Robert Love
     [not found] <200109202253.RAA21082@waste.org>
2001-09-20 23:15 ` Oliver Xymoron
2001-09-21  0:42   ` Roger Larsson
2001-09-21  1:03     ` Alan Cox
2001-09-21  1:22       ` Andrea Arcangeli
2001-09-21  1:51         ` Rik van Riel
2001-09-21  1:38       ` Roger Larsson
2001-09-21  1:53         ` Roger Larsson
2001-09-21  2:08           ` Roger Larsson
2001-09-21  2:29             ` Rik van Riel
2001-09-21 16:24       ` Jussi Laako
2001-09-21 16:36         ` Alan Cox
2001-09-21 18:46         ` Thomas Sailer
2001-09-22 10:30           ` Jussi Laako
2001-09-21 16:18     ` Stefan Westerfeld
2001-09-21 20:18       ` Dieter Nützel
2001-09-21 21:47       ` Robert Love
2002-04-09  5:23 [PATCH] preemption latency measurement tool 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=20010923014156Z272552-760+15680@vger.kernel.org \
    --to=safemode@speakeasy.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rml@tech9.net \
    --cc=roger.larsson@norran.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

Powered by JetHome