From: Andrew Morton <andrewm@uow.edu.au>
To: Roger Larsson <roger.larsson@norran.net>
Cc: "linux-kernel@vger.rutgers.edu" <linux-kernel@vger.rutgers.edu>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-audio-dev@ginette.musique.umontreal.ca"
<linux-audio-dev@ginette.musique.umontreal.ca>
Subject: Re: new latency report
Date: Fri, 07 Jul 2000 13:21:48 +1000 [thread overview]
Message-ID: <39654CCC.9DE5000E@uow.edu.au> (raw)
In-Reply-To: <3965371A.6F72A3FF@norran.net>
[-- Attachment #1: Type: text/plain, Size: 747 bytes --]
Roger Larsson wrote:
>
> Hi,
>
> The attached output shows that when we hit swap - there are
> code lines with latency problems :-(
> [the actual code tested is test3-pre2 with my latency modifications
> (improvement and profiling) but has one modification relative
> test3-pre4
> kswapd in the tested version always sleeps => problems accounted
> to the process causing it]
I'm losing sleep over kswapd.
> see the 293ms in generic_make_request...
Try adding the attached patch to your existing tree. It fixes a lot of stuff. sys_close() and sys_exit() still need attention.
> and the 704ms used to busy loop in modprobe...
> (SB16 non PnP)
Don't worry about it.
> These are worse then the previously found aux_write_dev :-(
Or this.
[-- Attachment #2: low-latency.patch --]
[-- Type: text/plain, Size: 1427 bytes --]
--- linux-2.4.0-test3-pre4/mm/filemap.c Thu Jul 6 20:23:47 2000
+++ linux-akpm/mm/filemap.c Fri Jul 7 01:39:02 2000
@@ -160,6 +160,8 @@
start = (lstart + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
repeat:
+ if (current->need_resched)
+ schedule(); /* LOWLATENCY sys_unlink() */
head = &mapping->pages;
spin_lock(&pagecache_lock);
curr = head->next;
@@ -450,6 +452,10 @@
page_cache_get(page);
spin_unlock(&pagecache_lock);
+
+ if (current->need_resched)
+ schedule(); /* LOWLATENCY sys_sync() */
+
lock_page(page);
/* The buffers could have been free'd while we waited for the page lock */
@@ -1081,6 +1087,9 @@
* "pos" here (the actor routine has to update the user buffer
* pointers and the remaining count).
*/
+ if (current->need_resched)
+ schedule(); /* LOWLATENCY sys_read() */
+
nr = actor(desc, page, offset, nr);
offset += nr;
index += offset >> PAGE_CACHE_SHIFT;
@@ -1533,6 +1542,8 @@
* vma/file is guaranteed to exist in the unmap/sync cases because
* mmap_sem is held.
*/
+ if (current->need_resched)
+ schedule(); /* LOWLATENCY sys_msync() */
return page->mapping->a_ops->writepage(file, page);
}
@@ -2486,6 +2497,9 @@
while (count) {
unsigned long bytes, index, offset;
char *kaddr;
+
+ if (current->need_resched)
+ schedule(); /* LOWLATENCY sys_write() */
/*
* Try to find the page in the cache. If it isn't there,
next prev parent reply other threads:[~2000-07-07 3:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-07 1:49 Roger Larsson
2000-07-07 3:21 ` Andrew Morton [this message]
2000-07-07 14:38 ` Oliver Xymoron
2000-07-09 17:44 ` Alan Cox
2000-07-09 18:13 ` [linux-audio-dev] " Benno Senoner
2000-07-10 21:30 ` Jörn Nettingsmeier
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=39654CCC.9DE5000E@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=linux-audio-dev@ginette.musique.umontreal.ca \
--cc=linux-kernel@vger.rutgers.edu \
--cc=linux-mm@kvack.org \
--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