virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: stable@kernel.org,
	Virtualization List <virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 1/2] virtio: console: Wake up outvq on host notifications
Date: Mon, 31 Jan 2011 09:53:02 +0100	[thread overview]
Message-ID: <4D46786E.90001@redhat.com> (raw)
In-Reply-To: <eb504880dbb2b70d51c62a63012b69408b80d070.1296459389.git.amit.shah@redhat.com>

Acked-by: Hans de Goede <hdegoede@redhat.com>

On 01/31/2011 08:36 AM, Amit Shah wrote:
> The outvq needs to be woken up on host notifications so that buffers
> consumed by the host can be reclaimed, outvq freed, and application
> writes may proceed again.
>
> The need for this is now finally noticed when I have qemu patches ready
> to use nonblocking IO and flow control.
>
> CC: Hans de Goede<hdegoede@redhat.com>
> CC: stable@kernel.org
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
> ---
>   drivers/tty/hvc/virtio_console.c |   15 +++++++++++++--
>   1 files changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/hvc/virtio_console.c b/drivers/tty/hvc/virtio_console.c
> index c4b0255..1068095 100644
> --- a/drivers/tty/hvc/virtio_console.c
> +++ b/drivers/tty/hvc/virtio_console.c
> @@ -1473,6 +1473,17 @@ static void control_work_handler(struct work_struct *work)
>   	spin_unlock(&portdev->cvq_lock);
>   }
>
> +static void out_intr(struct virtqueue *vq)
> +{
> +	struct port *port;
> +
> +	port = find_port_by_vq(vq->vdev->priv, vq);
> +	if (!port)
> +		return;
> +
> +	wake_up_interruptible(&port->waitqueue);
> +}
> +
>   static void in_intr(struct virtqueue *vq)
>   {
>   	struct port *port;
> @@ -1577,7 +1588,7 @@ static int init_vqs(struct ports_device *portdev)
>   	 */
>   	j = 0;
>   	io_callbacks[j] = in_intr;
> -	io_callbacks[j + 1] = NULL;
> +	io_callbacks[j + 1] = out_intr;
>   	io_names[j] = "input";
>   	io_names[j + 1] = "output";
>   	j += 2;
> @@ -1591,7 +1602,7 @@ static int init_vqs(struct ports_device *portdev)
>   		for (i = 1; i<  nr_ports; i++) {
>   			j += 2;
>   			io_callbacks[j] = in_intr;
> -			io_callbacks[j + 1] = NULL;
> +			io_callbacks[j + 1] = out_intr;
>   			io_names[j] = "input";
>   			io_names[j + 1] = "output";
>   		}

  parent reply	other threads:[~2011-01-31  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-31  7:36 [PATCH 1/2] virtio: console: Wake up outvq on host notifications Amit Shah
2011-01-31  7:36 ` [PATCH 2/2] virtio: console: Update Copyright Amit Shah
2011-01-31  8:53 ` Hans de Goede [this message]
2011-01-31 10:03 ` [PATCH 1/2] virtio: console: Wake up outvq on host notifications Rusty Russell
2011-01-31 10:28   ` Amit Shah
2011-01-31 10:29   ` Rusty Russell

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=4D46786E.90001@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=stable@kernel.org \
    --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).