Linux Sound subsystem development
 help / color / mirror / Atom feed
From: yodaiken@chelm.cs.nmt.edu
To: linux-sound@vger.kernel.org
Subject: Re: [rtl] Low-latency patches working GREAT (<2.9ms audio latency), see testresults ,but ISDN troubl
Date: Mon, 30 Aug 1999 08:18:10 +0000	[thread overview]
Message-ID: <marc-linux-sound-93600508519610@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-93588421815439@msgid-missing>

On Mon, Aug 30, 1999 at 09:30:04AM +0200, Ingo Molnar wrote:
> 
> On Mon, 30 Aug 1999 yodaiken@chelm.cs.nmt.edu wrote:
> 
> > I don't see how your code avoids reschedules from non SCHED_FIFO/RR
> > processes. [...]
> 
> i dont really understand your point. _if_ current->need_resched is set we
> should reschedule ASAP - thats all. Thats a generic kernel rule - it's up

No. If current->need_resched is set, we should reschedule at a preemption
point. What your patch does is dramatically increase the number of
preemption points -- that changes the meaning.

> to the scheduling code to balance timeslices and priorities properly. The
> patch is only enforcing this rule more accurately than old kernels. But if
> you think this is something new then you are wrong.

It absolutely is something new. In the current kernel, we check for
preemption only at points where we are about to do a context
switch anyways - from k to user modulo some places like mem.c .
That is the logic is:
                     before commit to a switch to user, see
                     if there is a hint to call the scheudler
This is not the same as
                     before copy a block check to see if there
                     is a hint to call the scheduler.



> >              [...] But first explain why a screen saver will not trigger
> > the same behavior. The screen saver will do fast writes to the screen,
> > and these will trigger io for X and for the saver itself. Both operations
> > will set needs_resched. So we expect io performance to get worse 
> > in this case. Right?
> 
> wrong. The behavior of X & screensaver does not change the slightest from
> current kernels. The patch adds no additional behavior! We check for

The patch is not intended to add additional behavior.  I know that. I
still don't see why the screen saver i/o ops that will either set needs
rescehd directly or schedule a bottom half task will not cause extra
context switches.


> need_resched at _every_ system-call return (or IRQ return to user-space,
> or signal delivery) anyway. The patch only shortens certain longer
> 'scheduling atoms' by either splitting them up into smaller pieces or by
> redesigning them. But this does not cause any macro-effect - apart from
> situations of course which are now behaving correctly.

How do you know?

> [btw. 99% of the time the X client gets rescheduled is not due to
> need_resched but due to the unix-domain socket buffer running out of write
> space. And this is true globally, need_resched itself is resposible for a
> small fraction of reschedules only.]

In the current system, yes. After your patch, it is not at all clear.

  parent reply	other threads:[~1999-08-30  8:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-28 23:55 [rtl] Low-latency patches working GREAT (<2.9ms audio latency), see testresults ,but ISDN troubl yodaiken
1999-08-29  0:24 ` Alan Cox
1999-08-29  1:59 ` yodaiken
1999-08-29  6:21 ` [rtl] Low-latency patches working GREAT (<2.9ms audio latency), Linus Torvalds
1999-08-29  7:13 ` [rtl] Low-latency patches working GREAT (<2.9ms audio latency), see testresults ,but ISDN troubl Ingo Molnar
1999-08-29  7:15 ` Ingo Molnar
1999-08-29  7:17 ` Ingo Molnar
1999-08-29 13:59 ` yodaiken
1999-08-29 14:22 ` David Olofson
1999-08-29 20:48 ` yodaiken
1999-08-30  6:09 ` yodaiken
1999-08-30  6:55 ` Ingo Molnar
1999-08-30  7:30 ` Ingo Molnar
1999-08-30  8:18 ` yodaiken [this message]
1999-08-30  9:45 ` Ingo Molnar
1999-08-30 11:13 ` Stephen C. Tweedie
1999-09-04 20:41 ` yodaiken
1999-09-06  7:43 ` [rtl] Low-latency patches working GREAT (<2.9ms audio latency), Andrea Arcangeli

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=marc-linux-sound-93600508519610@msgid-missing \
    --to=yodaiken@chelm.cs.nmt.edu \
    --cc=linux-sound@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