kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@openvz.org>
To: Asias He <asias.hejun@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	Sasha Levin <levinsasha928@gmail.com>,
	Ingo Molnar <mingo@elte.hu>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] kvm tools: Process virito blk requests in separate thread
Date: Mon, 4 Jun 2012 19:48:35 +0400	[thread overview]
Message-ID: <20120604154835.GE23701@moon> (raw)
In-Reply-To: <1338824453-25260-1-git-send-email-asias.hejun@gmail.com>

On Mon, Jun 04, 2012 at 11:40:53PM +0800, Asias He wrote:
>  
> +static void *virtio_blk_thread(void *dev)
> +{
> +	struct blk_dev *bdev = dev;
> +	u64 data;
> +
> +	while (1) {
> +		read(bdev->io_efd, &data, sizeof(u64));
> +		virtio_blk_do_io(bdev->kvm, &bdev->vqs[0], bdev);
> +	}
> +
> +	pthread_exit(NULL);
> +	return NULL;
> +}

I must admit I don't understand this code ;) The data get read into
stack variable forever?

	Cyrill

  reply	other threads:[~2012-06-04 15:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 15:40 [PATCH] kvm tools: Process virito blk requests in separate thread Asias He
2012-06-04 15:48 ` Cyrill Gorcunov [this message]
2012-06-05  0:47   ` Asias He
2012-06-05  6:10     ` Cyrill Gorcunov
2012-06-04 16:07 ` Sasha Levin
2012-06-05  1:03   ` Asias He
2012-06-05  8:14     ` Pekka Enberg
2012-06-06 12:35   ` Paolo Bonzini
2012-06-07  1:38     ` Asias He
2012-06-07  8:47       ` Paolo Bonzini
2012-06-08  3:30         ` Asias He
2012-06-05  8:15 ` Pekka Enberg
  -- strict thread matches above, loose matches on Subject: below --
2011-11-29 14:28 Asias He
2011-11-29 14:36 ` Sasha Levin
2011-11-30  7:21   ` Asias He
2011-12-01  8:48     ` Pekka Enberg
2011-12-01  8:58       ` Sasha Levin
2011-12-01 10:45         ` Pekka Enberg

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=20120604154835.GE23701@moon \
    --to=gorcunov@openvz.org \
    --cc=asias.hejun@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@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;
as well as URLs for NNTP newsgroup(s).