virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: axboe@kernel.dk, Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, hch@infradead.org
Subject: Re: [RFC] virtio: Support releasing lock during kick
Date: Sun, 19 Jun 2011 09:55:07 -0400	[thread overview]
Message-ID: <20110619135507.GA25728@infradead.org> (raw)
In-Reply-To: <20110619074841.GA8613@redhat.com>

On Sun, Jun 19, 2011 at 10:48:41AM +0300, Michael S. Tsirkin wrote:
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 4ce953f..a8672ec 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -433,6 +433,8 @@ void blk_run_queue(struct request_queue *q)
>  	spin_lock_irqsave(q->queue_lock, flags);
>  	__blk_run_queue(q);
>  	spin_unlock_irqrestore(q->queue_lock, flags);
> +	if (q->request_done)
> +		q->request_done(q);

We have quite a few cases where __blk_run_queue is called directly, and
one more (although not applicable to virtio-blk) that calls ->request_fn
directly.

I think Stefan's way is the way to go for now, releasing and reacquiring
the queue lock once in ->request_fn is much less than the common IDE and
SCSI setups do today.

Eventually ->queue_lock should be split from the driver-internal lock,
and we could do a more efficient calling convention than the one per
request blk_peek_request.  I've started looking into that, but it's
going to take a while.

  parent reply	other threads:[~2011-06-19 13:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1277328242-10685-1-git-send-email-stefanha@linux.vnet.ibm.com>
2010-06-23 22:12 ` [RFC] virtio: Support releasing lock during kick Anthony Liguori
     [not found] ` <4C2286BE.40808@codemonkey.ws>
2010-06-24  5:30   ` Stefan Hajnoczi
     [not found]   ` <AANLkTim6CH_NruBFqK6fIkMkKpAuCIef50mHfldMtNH9@mail.gmail.com>
2010-06-25  3:09     ` Rusty Russell
     [not found]     ` <201006251239.23224.rusty@rustcorp.com.au>
2010-06-25  6:17       ` Stefan Hajnoczi
2010-06-25 10:43       ` Michael S. Tsirkin
     [not found]       ` <20100625104317.GC16321@redhat.com>
2010-06-25 15:31         ` Stefan Hajnoczi
     [not found]         ` <20100625153143.GA12784@stefan-thinkpad.transitives.com>
2010-06-25 15:32           ` Michael S. Tsirkin
     [not found]           ` <20100625153220.GB17911@redhat.com>
2010-06-25 16:05             ` Stefan Hajnoczi
2010-06-28 15:55 ` Marcelo Tosatti
     [not found] ` <20100628155505.GB4717@amt.cnet>
2010-06-29  7:08   ` Stefan Hajnoczi
     [not found]   ` <AANLkTikhPJnw81hhh3PQGSwv7Hkd56YMlOZQM0N-fTLp@mail.gmail.com>
2010-06-29  7:12     ` Avi Kivity
2011-06-19  7:14 ` Michael S. Tsirkin
2011-06-20 15:27   ` Stefan Hajnoczi
     [not found]   ` <BANLkTi=fsSLNu2ybeMKvN7gtCDO5FDNfDA@mail.gmail.com>
2011-06-24  9:16     ` Stefan Hajnoczi
2011-08-10 13:18     ` Christoph Hellwig
     [not found]     ` <20110810131801.GA12571@infradead.org>
2011-08-10 14:39       ` Stefan Hajnoczi
2011-06-19  7:48 ` Michael S. Tsirkin
     [not found] ` <20110619074841.GA8613@redhat.com>
2011-06-19 13:55   ` Christoph Hellwig [this message]
2010-06-23 21:24 Stefan Hajnoczi

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=20110619135507.GA25728@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=stefanha@linux.vnet.ibm.com \
    --cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).