From: "Ronny V. Vindenes" <s864@ii.uib.no>
To: Jens Axboe <axboe@suse.de>
Cc: ck@vds.kolivas.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: CFQ v2 high cpu load fix(?)
Date: Tue, 12 Oct 2004 13:16:00 +0200 [thread overview]
Message-ID: <1097579760.4086.27.camel@tentacle125.gozu.lan> (raw)
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
CFQ v2 is much better in a lot of cases, but certain situations trigger
a cpu load so high it starves the rest of the system thus completely
ruining the interactive experience. While casually looking at the
problem, I stumbled upon a patch by Arjan van de Ven sent to lkml on
sept. 1 (Subject: block fixes). Part of it is already included in the
CFQ v2 patches and after applying the rest[1] I'm no longer able to
trigger the problem.
[1] Patch attached against 2.6.9-rc4-ck1 but applies to rc4-mm1 with
some minor fuzz.
--
Ronny V. Vindenes <s864@ii.uib.no>
[-- Attachment #2: block-fix.patch --]
[-- Type: text/x-patch, Size: 1085 bytes --]
--- patches/linux-2.6.9-rc4-ck1/drivers/block/ll_rw_blk.c 2004-10-12 12:25:09.798003278 +0200
+++ linux-2.6.9-rc4-ck1/drivers/block/ll_rw_blk.c 2004-10-12 12:25:42.959479479 +0200
@@ -100,7 +100,7 @@
nr = q->nr_requests;
q->nr_congestion_on = nr;
- nr = q->nr_requests - (q->nr_requests / 8) - 1;
+ nr = q->nr_requests - (q->nr_requests / 8) - (q->nr_requests/16)- 1;
if (nr < 1)
nr = 1;
q->nr_congestion_off = nr;
@@ -1758,8 +1758,10 @@
{
DEFINE_WAIT(wait);
struct request *rq;
+ struct io_context *ioc;
generic_unplug_device(q);
+ ioc = get_io_context(GFP_NOIO);
do {
struct request_list *rl = &q->rq;
@@ -1769,7 +1771,6 @@
rq = get_request(q, rw, GFP_NOIO);
if (!rq) {
- struct io_context *ioc;
io_schedule();
@@ -1779,12 +1780,11 @@
* up to a big batch of them for a small period time.
* See ioc_batching, ioc_set_batching
*/
- ioc = get_io_context(GFP_NOIO);
ioc_set_batching(q, ioc);
- put_io_context(ioc);
}
finish_wait(&rl->wait[rw], &wait);
} while (!rq);
+ put_io_context(ioc);
return rq;
}
next reply other threads:[~2004-10-12 11:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-12 11:16 Ronny V. Vindenes [this message]
2004-10-12 11:26 ` Nick Piggin
2004-10-12 12:12 ` Jens Axboe
2004-10-12 12:30 ` Nick Piggin
2004-10-12 13:22 ` Jens Axboe
2004-10-12 13:50 ` Nick Piggin
2004-10-12 20:44 ` Prakash K. Cheemplavam
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=1097579760.4086.27.camel@tentacle125.gozu.lan \
--to=s864@ii.uib.no \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--cc=ck@vds.kolivas.org \
--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
all inboxes | Powered by JetHome®