From: Jan Kasprzak <kas@informatics.muni.cz>
To: linux-kernel@vger.kernel.org
Subject: SOLVED: Performance drop 2.6.0-test7 -> 2.6.1-rc2
Date: Tue, 13 Jan 2004 11:11:34 +0100 [thread overview]
Message-ID: <20040113111133.A17239@fi.muni.cz> (raw)
In-Reply-To: <20040107102521.E12316@fi.muni.cz>; from kas@informatics.muni.cz on Wed, Jan 07, 2004 at 10:25:21AM +0100
Jan Kasprzak wrote:
: Yesterday I have upgraded the kernel on my FTP server to 2.6.1-rc2
: (from 2.6.0-test7) and today I have found the server struggling under
: load average of 40+ and the system was barely usable. The main load on the
: server is ProFTPd serving mainly ISO 9660 images using sendfile().
For archives: Andrew Morton suggested to apply the following patch
to mm/filemap.c (which in fact reverts part of the patch-2.6.1), and this
solved the problem (bigger-than-needed read ahead when doing sendfile()
of large files). 2.6.1 with this patch works for me now. Thanks!
-Yenya
diff -puN mm/filemap.c~readahead-partial-backout mm/filemap.c
--- 25/mm/filemap.c~readahead-partial-backout 2004-01-09 22:19:32.000000000 -0800
+++ 25-akpm/mm/filemap.c 2004-01-09 22:19:32.000000000 -0800
@@ -587,22 +587,13 @@ void do_generic_mapping_read(struct addr
read_actor_t actor)
{
struct inode *inode = mapping->host;
- unsigned long index, offset, last;
+ unsigned long index, offset;
struct page *cached_page;
int error;
cached_page = NULL;
index = *ppos >> PAGE_CACHE_SHIFT;
offset = *ppos & ~PAGE_CACHE_MASK;
- last = (*ppos + desc->count) >> PAGE_CACHE_SHIFT;
-
- /*
- * Let the readahead logic know upfront about all
- * the pages we'll need to satisfy this request
- */
- for (; index < last; index++)
- page_cache_readahead(mapping, ra, filp, index);
- index = *ppos >> PAGE_CACHE_SHIFT;
for (;;) {
struct page *page;
@@ -621,6 +612,7 @@ void do_generic_mapping_read(struct addr
}
cond_resched();
+ page_cache_readahead(mapping, ra, filp, index);
nr = nr - offset;
find_page:
_
--
| Jan "Yenya" Kasprzak <kas at {fi.muni.cz - work | yenya.net - private}> |
| GPG: ID 1024/D3498839 Fingerprint 0D99A7FB206605D7 8B35FCDE05B18A5E |
| http://www.fi.muni.cz/~kas/ Czech Linux Homepage: http://www.linux.cz/ |
| I actually have a lot of admiration and respect for the PATA knowledge |
| embedded in drivers/ide. But I would never call it pretty:) -Jeff Garzik |
prev parent reply other threads:[~2004-01-13 10:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 9:25 Performance drop 2.6.0-test7 -> 2.6.1-rc2 Jan Kasprzak
2004-01-13 10:11 ` Jan Kasprzak [this message]
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=20040113111133.A17239@fi.muni.cz \
--to=kas@informatics.muni.cz \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).