public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Marcin Dalecki <dalecki@evision.ag>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Jens Axboe <axboe@suse.de>, linux-kernel@vger.kernel.org
Subject: Re: cpqarray broken since 2.5.19
Date: Wed, 24 Jul 2002 16:46:30 +0200	[thread overview]
Message-ID: <3D3EBDC6.3060601@evision.ag> (raw)
In-Reply-To: Pine.SOL.4.30.0207241632350.15605-100000@mion.elka.pw.edu.pl

Bartlomiej Zolnierkiewicz wrote:
> On Wed, 24 Jul 2002, Jens Axboe wrote:
> 
> 
>>On Wed, Jul 24 2002, Marcin Dalecki wrote:
>>
>>>>Jens, the same is in cciss.c.
>>>>Please remove locking from blk_stop_queue() (as you suggested) or intrduce
>>>>unlocking in request_functions.
>>>>
>>>
>>>Bartek I think the removal is just for reassertion that the
>>>locking is the problem. You can't remove it easly from
>>>blk_stop_queue() unless you make it mandatory that blk_stop_queue
>>>has to be run with the lock already held. Or in other words
>>>basically -> Don't use blk_stop_queue() outside of ->request_fn.
>>
>>Of couse Bart is advocating just making sure that every caller of
>>blk_stop_queue() _has_ the queue_lock before calling it, not removing
>>the locking there.
>>
>>--
>>Jens Axboe
> 
> 
> And I'm also advocating for __blk_start_queue() ideal for usage in
> ata_end_request(). And moving spin_lock scope to cover test_and_set_bit()
> in blk_start_queue() (for coherency and avoiding spurious calls to
> q->request_fn() )

You mean this:

void blk_start_queue(request_queue_t *q)
{
	if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)) {
		unsigned long flags;

		spin_lock_irqsave(q->queue_lock, flags);
		if (!test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)) {
			spin_unlock_irqrestore(q->queue_lock, flags);
			return;
		}
		clear_bit(QUEUE_FLAG_STOPPED, &q->queue_flags);
		if (!elv_queue_empty(q))
			q->request_fn(q);
		spin_unlock_irqrestore(q->queue_lock, flags);
	}
}

Becouse this is avoiding checking for spinlock in the case
the queue is not stopped.

The spinlock free variant isn't needed right.

> However IDE_BUSY -> QUEUE_STOPPED_FLAG is braindamaged idea.

You should never see it. Think of it as a mind bridge between
IDE_BUSY and queue plug and unplug please. Becouse the purpose
of IDE_BUSY *is* to effectively stall queue processing for
the time of internally issued request. OK?


  parent reply	other threads:[~2002-07-24 14:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-21 15:28 cpqarray broken since 2.5.19 Adam Kropelin
2002-07-24 13:39 ` Jens Axboe
2002-07-24 14:07   ` Bartlomiej Zolnierkiewicz
2002-07-24 14:09     ` Jens Axboe
2002-07-24 14:11     ` Marcin Dalecki
2002-07-24 14:19       ` Jens Axboe
2002-07-24 14:41         ` Bartlomiej Zolnierkiewicz
2002-07-24 14:44           ` Jens Axboe
2002-07-24 14:46           ` Marcin Dalecki [this message]
2002-07-24 15:15             ` Bartlomiej Zolnierkiewicz
2002-07-24 14:21       ` Bartlomiej Zolnierkiewicz
2002-07-24 14:27         ` Marcin Dalecki
2002-07-24 14:45           ` Bartlomiej Zolnierkiewicz
2002-07-25  0:32   ` Adam Kropelin
2002-07-25 10:39     ` Jens Axboe
2002-07-26  0:30       ` Adam Kropelin

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=3D3EBDC6.3060601@evision.ag \
    --to=dalecki@evision.ag \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    /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