From: Tejun Heo <htejun@gmail.com>
To: axboe@suse.de, akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH linux-2.6.12-rc6-mm1] blk: elevator unplug thresh hanlding fix
Date: Thu, 16 Jun 2005 12:47:06 +0900 [thread overview]
Message-ID: <20050616034705.GA29048@htj.dyndns.org> (raw)
Hello, Jens.
Hello, Andrew.
This patch fixes q->unplug_thresh condition check in
__elv_add_request(). rq.count[READ] + rq.count[WRITE] can increase
more than one if another thread has allocated a request after the
current request is allocated or in_flight could have changed resulting
in larger-than-one change of nrq, thus breaking the threshold
mechanism.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Index: blk-fixes/drivers/block/elevator.c
===================================================================
--- blk-fixes.orig/drivers/block/elevator.c 2005-06-16 12:16:59.000000000 +0900
+++ blk-fixes/drivers/block/elevator.c 2005-06-16 12:17:03.000000000 +0900
@@ -352,7 +352,7 @@ void __elv_add_request(request_queue_t *
int nrq = q->rq.count[READ] + q->rq.count[WRITE]
- q->in_flight;
- if (nrq == q->unplug_thresh)
+ if (nrq >= q->unplug_thresh)
__generic_unplug_device(q);
}
} else
next reply other threads:[~2005-06-16 3:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-16 3:47 Tejun Heo [this message]
2005-06-16 6:56 ` [PATCH linux-2.6.12-rc6-mm1] blk: elevator unplug thresh hanlding fix Jens Axboe
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=20050616034705.GA29048@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=akpm@osdl.org \
--cc=axboe@suse.de \
--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