From: Andrew Morton <akpm@osdl.org>
To: Felix von Leitner <felix-kernel@fefe.de>
Cc: linux-kernel@vger.kernel.org, Ram Pai <linuxram@us.ibm.com>
Subject: Re: 2.6.1 sendfile regression
Date: Fri, 9 Jan 2004 16:21:49 -0800 [thread overview]
Message-ID: <20040109162149.1e88a643.akpm@osdl.org> (raw)
In-Reply-To: <20040110000128.GA301@codeblau.de>
Felix von Leitner <felix-kernel@fefe.de> wrote:
>
> I'm getting a huge sendfile regression in 2.6.1; when serving a large
> file on an IPv4 TCP socket via sendfile64, the transfer starts at about
> 4 MB (2.6.0: >7 MB) and the hard disk like stays on 100% (which normally
> only happens if the file is badly fragmented, fragmentation of this file
> is 0%). Then, suddenly, the network performance drops dramatically,
> getting worse and worse. strace shows that the process is hanging
> inside sendfile64 (which should not happen since the socket is
> non-blocking). The process then stays inside sendfile for up to a
> minute or so and can't be interrupted or killed in that time.
>
Probably it is the ill-advised readahead tweak. Does the below patch fix
it up?
diff -puN mm/filemap.c~a mm/filemap.c
--- 25/mm/filemap.c~a Fri Jan 9 16:20:32 2004
+++ 25-akpm/mm/filemap.c Fri Jan 9 16:20:46 2004
@@ -596,12 +596,6 @@ void do_generic_mapping_read(struct addr
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 (;;) {
_
next prev parent reply other threads:[~2004-01-10 0:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-10 0:01 2.6.1 sendfile regression Felix von Leitner
2004-01-10 0:21 ` Andrew Morton [this message]
2004-01-10 0:52 ` Ram Pai
2004-01-10 1:42 ` Andrew Morton
2004-01-10 5:23 ` Lennert Buytenhek
2004-01-12 2:58 ` Linus Torvalds
2004-01-12 11:31 ` Lennert Buytenhek
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=20040109162149.1e88a643.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=felix-kernel@fefe.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
/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