From: Jens Axboe <axboe@suse.de>
To: blaisorblade_spam@yahoo.it
Cc: akpm@osdl.org, jdike@addtoit.com, linux-kernel@vger.kernel.org,
user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [patch 1/3] uml-ubd-no-empty-queue
Date: Tue, 7 Sep 2004 11:35:59 +0200 [thread overview]
Message-ID: <20040907093559.GL6323@suse.de> (raw)
In-Reply-To: <20040906174447.238788D1E@zion.localdomain>
On Mon, Sep 06 2004, blaisorblade_spam@yahoo.it wrote:
>
> Avoid using, in the UBD driver, the elv_queue_empty function. It's for
> the block layer only; in fact, the Anticipatory Scheduler can return NULL
> with elv_next_request() even if the queue is not empty, because it waits
> for the process to send another request before seeking on the disk.
>
> In fact, if (with uml-ubd-any-elevator) we let UBD use any scheduler,
> elevator=as will make the UBD driver Oops, if we don't have this patch.
>
> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
> ---
>
> uml-linux-2.6.8.1-paolo/arch/um/drivers/ubd_kern.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff -puN arch/um/drivers/ubd_kern.c~uml-ubd-no-empty-queue arch/um/drivers/ubd_kern.c
> --- uml-linux-2.6.8.1/arch/um/drivers/ubd_kern.c~uml-ubd-no-empty-queue 2004-08-29 14:40:51.313410952 +0200
> +++ uml-linux-2.6.8.1-paolo/arch/um/drivers/ubd_kern.c 2004-08-29 14:40:51.315410648 +0200
> @@ -1038,8 +1038,7 @@ static void do_ubd_request(request_queue
> int err, n;
>
> if(thread_fd == -1){
> - while(!elv_queue_empty(q)){
> - req = elv_next_request(q);
> + while((req = elv_next_request(q)) != NULL){
> err = prepare_request(req, &io_req);
> if(!err){
> do_io(&io_req);
> @@ -1048,9 +1047,8 @@ static void do_ubd_request(request_queue
> }
> }
> else {
> - if(do_ubd || elv_queue_empty(q))
> + if(do_ubd || (req = elv_next_request(q)) == NULL)
> return;
> - req = elv_next_request(q);
> err = prepare_request(req, &io_req);
> if(!err){
> do_ubd = ubd_handler;
Patch is correct.
--
Jens Axboe
next prev parent reply other threads:[~2004-09-07 9:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-06 17:44 [patch 1/3] uml-ubd-no-empty-queue blaisorblade_spam
2004-09-06 21:26 ` Andrew Morton
2004-09-07 2:26 ` Jeff Garzik
2004-09-07 18:04 ` [uml-devel] " BlaisorBlade
2004-09-07 21:23 ` Andrew Morton
2004-09-07 9:35 ` Jens Axboe [this message]
2004-09-07 18:50 ` BlaisorBlade
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=20040907093559.GL6323@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=blaisorblade_spam@yahoo.it \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.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