All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <piggin@cyberone.com.au>
To: Andrew Morton <akpm@osdl.org>, "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: 2.6.0-test2-mm5
Date: Thu, 07 Aug 2003 18:40:42 +1000	[thread overview]
Message-ID: <3F32108A.2010000@cyberone.com.au> (raw)
In-Reply-To: <3F320DFC.6070400@cyberone.com.au>

[-- Attachment #1: Type: text/plain, Size: 443 bytes --]

Andrew and or Martin, please test attached patch.
Thanks.

Nick Piggin wrote:

>
>
> Andrew Morton wrote:
>
>> "Martin J. Bligh" <mbligh@aracnet.com> wrote:
>>
>>> I get lots of these .... (without 4/4 turned on)
>>>
>>>  Badness in as_dispatch_request at drivers/block/as-iosched.c:1241
>>>
>>
>> yes, it happens with aic7xxx as well.  Sorry about that.
>>
>> You'll need to revert
>>
>
> Sorry. Worked with the sym53c8xx for me. I'll fix.
>

[-- Attachment #2: as-mm5-fix --]
[-- Type: text/plain, Size: 1185 bytes --]

--- linux-2.6/drivers/block/as-iosched.c.orig	2003-08-07 18:33:06.000000000 +1000
+++ linux-2.6/drivers/block/as-iosched.c	2003-08-07 18:36:03.000000000 +1000
@@ -1198,8 +1198,10 @@ static int as_dispatch_request(struct as
 			 */
 			goto dispatch_writes;
 
- 		if (ad->batch_data_dir == REQ_ASYNC)
+ 		if (ad->batch_data_dir == REQ_ASYNC) {
+			WARN_ON(ad->new_batch || ad->changed_batch);
  			ad->changed_batch = 1;
+		}
 		ad->batch_data_dir = REQ_SYNC;
 		arq = list_entry_fifo(ad->fifo_list[ad->batch_data_dir].next);
 		ad->last_check_fifo[ad->batch_data_dir] = jiffies;
@@ -1214,8 +1216,17 @@ static int as_dispatch_request(struct as
 dispatch_writes:
 		BUG_ON(RB_EMPTY(&ad->sort_list[REQ_ASYNC]));
 
- 		if (ad->batch_data_dir == REQ_SYNC)
+ 		if (ad->batch_data_dir == REQ_SYNC) {
+			WARN_ON(ad->changed_batch);
  			ad->changed_batch = 1;
+
+			/*
+			 * new_batch might be 1 when the queue runs out of
+			 * reads. A subsequent submission of a write might
+			 * cause a change of batch before the read is finished.
+			 */
+			ad->new_batch = 0;
+		}
 		ad->batch_data_dir = REQ_ASYNC;
 		ad->current_write_count = ad->write_batch_count;
 		ad->write_batch_idled = 0;

  reply	other threads:[~2003-08-07  8:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-07  5:37 2.6.0-test2-mm5 Andrew Morton
2003-08-07  5:37 ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07  6:31 ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-07  6:31   ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-07  7:05   ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07  7:05     ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07  8:29     ` 2.6.0-test2-mm5 Nick Piggin
2003-08-07  8:29       ` 2.6.0-test2-mm5 Nick Piggin
2003-08-07  8:40       ` Nick Piggin [this message]
2003-08-07  8:43         ` 2.6.0-test2-mm5 Nick Piggin
2003-08-07 18:30           ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-07 18:30             ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-07  8:44         ` 2.6.0-test2-mm5 Jens Axboe
2003-08-07  8:44           ` 2.6.0-test2-mm5 Jens Axboe
2003-08-07  6:33 ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-07  6:33   ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-07  6:44   ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07  6:44     ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07  8:00 ` 2.6.0-test2-mm5 Christoph Hellwig
2003-08-07  8:00   ` 2.6.0-test2-mm5 Christoph Hellwig
2003-08-07 21:21 ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-07 21:21   ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-07 21:24   ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-07 21:24     ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-07 21:28   ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07 21:28     ` 2.6.0-test2-mm5 Andrew Morton
2003-08-07 22:07     ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-07 22:07       ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-08 20:51       ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-08 20:51         ` 2.6.0-test2-mm5 Marcelo Tosatti
2003-08-08 21:36         ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-08 21:36           ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-07 23:47 ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-07 23:47   ` 2.6.0-test2-mm5 Martin J. Bligh
2003-08-08  0:16   ` 2.6.0-test2-mm5 William Lee Irwin III
2003-08-08  0:16     ` 2.6.0-test2-mm5 William Lee Irwin III

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=3F32108A.2010000@cyberone.com.au \
    --to=piggin@cyberone.com.au \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mbligh@aracnet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.