Linux Sound subsystem development
 help / color / mirror / Atom feed
From: yodaiken@fsmlabs.com
To: linux-sound@vger.kernel.org
Subject: Re: [rtl] Low-latency patches working GREAT (<2.9ms audio latency), see testresults ,but ISDN troubl
Date: Sun, 29 Aug 1999 13:59:20 +0000	[thread overview]
Message-ID: <marc-linux-sound-93593516007821@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-93588421815439@msgid-missing>


Here is a fundamental change from Ingo's patch:
 #define __copy_user(to,from,size)                                      \
 do {                                                                   \
        int __d0, __d1;                                                 \
+       conditional_schedule();                                         \
        __asm__ __volatile__(                                           \
                "0:     rep; movsl\n"                                   \
                "       movl %3,%0\n"  

Big change. And I think it is a change that makes a mistake about
what is more important. Terminating an i/o and being able to 
release a buffer is not always less critical than running the
next process.


And my candidate for "irreparably breaks Oracle" is
                for (i = nr_buffers_type[BUF_LOCKED]*2 ; i-- > 0 ; bh = next) {
+                       if (current->need_resched) {
+                               bh->b_count++;
+                               schedule();
+                               bh->b_count--;

What does Lmbench report on this patch set? I bet that the throughput
tests show the difference.

It would be interesting to consider how these changes might interact
with, for example, Stephen's semi-i/o-light changes for direct io or with
new fs designs or changes to the network subsystem. 

Some problems:
1. extra calls to schedule trash cache and trade bandwidth for latency
2. assumptions about machine timing become embedded in basic code and 
   will cause problems as timing changes.
3. the fundamental technique of this patch is to introduce reschedules
   that hide the problem instead of solving it. Instead of
   start_long_copy
          do a chunk
          conditional_reschedule
          loop
   It's more interesting to think about how to avoid the long copy in 
   the first place. A write request that asks to dump a big chunk of
   memory to i/o seems like it should be made to be lower latency by
   using a k buffer to page align and then doing direct i/o on user
   pages. Or, alternatively, we could put some smarts in libc for
   big i/o, or maybe we can make "write" understand something more
   about the destination device so that it can delegate copying to 
   smart devices and use a just-in-time copying approach for other
   devices. Any of these are a lot more difficult than introducing
   resched calls.

  parent reply	other threads:[~1999-08-29 13:59 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 [this message]
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
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-93593516007821@msgid-missing \
    --to=yodaiken@fsmlabs.com \
    --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