All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xianting Tian <xianting.tian@linux.alibaba.com>
Cc: xuanzhuo@linux.alibaba.com, herbert@gondor.apana.org.au,
	arnd@arndb.de, amit@kernel.org, gregkh@linuxfoundation.org,
	marcel@holtmann.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-bluetooth@vger.kernel.org, linux-crypto@vger.kernel.org,
	luiz.dentz@gmail.com, davem@davemloft.net,
	johan.hedberg@gmail.com
Subject: Re: [PATCH 2/3] virtio_console: fixup potential cpu stall when free unused bufs
Date: Fri, 9 Jun 2023 12:05:50 -0400	[thread overview]
Message-ID: <20230609120332-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230609131817.712867-3-xianting.tian@linux.alibaba.com>

On Fri, Jun 09, 2023 at 09:18:16PM +0800, Xianting Tian wrote:
> Cpu stall issue may happen if device is configured with multi queues
> and large queue depth, so fix it.

"may happen" is ambigous.

So is this: "for virtio-net we were getting
stall on CPU was observed message, this driver is similar
so theoretically the same logic applies"

or is this

"the following error occured: ..... "

?


> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>  drivers/char/virtio_console.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index b65c809a4e97..5ec4cf4ea919 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -1935,6 +1935,7 @@ static void remove_vqs(struct ports_device *portdev)
>  		flush_bufs(vq, true);
>  		while ((buf = virtqueue_detach_unused_buf(vq)))
>  			free_buf(buf, true);
> +		cond_resched();
>  	}
>  	portdev->vdev->config->del_vqs(portdev->vdev);
>  	kfree(portdev->in_vqs);
> -- 
> 2.17.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Xianting Tian <xianting.tian@linux.alibaba.com>
Cc: arei.gonglei@huawei.com, jasowang@redhat.com,
	xuanzhuo@linux.alibaba.com, herbert@gondor.apana.org.au,
	davem@davemloft.net, amit@kernel.org, arnd@arndb.de,
	gregkh@linuxfoundation.org, marcel@holtmann.org,
	johan.hedberg@gmail.com, luiz.dentz@gmail.com,
	linux-bluetooth@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] virtio_console: fixup potential cpu stall when free unused bufs
Date: Fri, 9 Jun 2023 12:05:50 -0400	[thread overview]
Message-ID: <20230609120332-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20230609131817.712867-3-xianting.tian@linux.alibaba.com>

On Fri, Jun 09, 2023 at 09:18:16PM +0800, Xianting Tian wrote:
> Cpu stall issue may happen if device is configured with multi queues
> and large queue depth, so fix it.

"may happen" is ambigous.

So is this: "for virtio-net we were getting
stall on CPU was observed message, this driver is similar
so theoretically the same logic applies"

or is this

"the following error occured: ..... "

?


> Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com>
> ---
>  drivers/char/virtio_console.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
> index b65c809a4e97..5ec4cf4ea919 100644
> --- a/drivers/char/virtio_console.c
> +++ b/drivers/char/virtio_console.c
> @@ -1935,6 +1935,7 @@ static void remove_vqs(struct ports_device *portdev)
>  		flush_bufs(vq, true);
>  		while ((buf = virtqueue_detach_unused_buf(vq)))
>  			free_buf(buf, true);
> +		cond_resched();
>  	}
>  	portdev->vdev->config->del_vqs(portdev->vdev);
>  	kfree(portdev->in_vqs);
> -- 
> 2.17.1


  reply	other threads:[~2023-06-09 16:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-09 13:18 [PATCH 0/3] fixup potential cpu stall Xianting Tian
2023-06-09 13:18 ` [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs Xianting Tian
2023-06-09 13:39   ` Greg KH
2023-06-09 13:39     ` Greg KH
2023-06-09 13:41     ` Greg KH
2023-06-09 13:41       ` Greg KH
2023-06-09 13:49       ` Xianting Tian
2023-06-09 14:05         ` Greg KH
2023-06-09 14:05           ` Greg KH
2023-06-09 14:25           ` Xianting Tian
2023-06-09 16:02           ` Michael S. Tsirkin
2023-06-09 16:02             ` Michael S. Tsirkin
2023-06-09 13:57   ` fixup potential cpu stall bluez.test.bot
2023-06-09 15:57   ` [PATCH 1/3] virtio-crypto: fixup potential cpu stall when free unused bufs Michael S. Tsirkin
2023-06-09 15:57     ` Michael S. Tsirkin
2023-06-10  3:20     ` Xianting Tian
2023-06-10  6:51       ` Greg KH
2023-06-10  6:51         ` Greg KH
2023-06-09 15:58   ` Michael S. Tsirkin
2023-06-09 15:58     ` Michael S. Tsirkin
2023-06-09 13:18 ` [PATCH 2/3] virtio_console: " Xianting Tian
2023-06-09 16:05   ` Michael S. Tsirkin [this message]
2023-06-09 16:05     ` Michael S. Tsirkin
2023-06-10  3:19     ` Xianting Tian
2023-06-09 13:18 ` [PATCH 3/3] virtio_bt: " Xianting Tian
2023-06-22 11:59 ` [PATCH 0/3] fixup potential cpu stall Michael S. Tsirkin
2023-06-22 11:59   ` Michael S. Tsirkin
2023-06-23  0:58   ` Xianting Tian
2023-07-06 20:10 ` patchwork-bot+bluetooth

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=20230609120332-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=amit@kernel.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xianting.tian@linux.alibaba.com \
    --cc=xuanzhuo@linux.alibaba.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.