linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] virtio-net: don't busy poll for cvq command
@ 2022-12-26  7:49 Jason Wang
  2022-12-26  7:49 ` [PATCH 1/4] virtio-net: convert rx mode setting to use workqueue Jason Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 53+ messages in thread
From: Jason Wang @ 2022-12-26  7:49 UTC (permalink / raw)
  To: mst, jasowang
  Cc: davem, edumazet, kuba, pabeni, virtualization, netdev,
	linux-kernel, maxime.coquelin, alvaro.karsz, eperezma

Hi all:

The code used to busy poll for cvq command which turns out to have
several side effects:

1) infinite poll for buggy devices
2) bad interaction with scheduler

So this series tries to use sleep + timeout instead of busy polling.

Please review.

Thanks

Changes since RFC:

- switch to use BAD_RING in virtio_break_device()
- check virtqueue_is_broken() after being woken up
- use more_used() instead of virtqueue_get_buf() to allow caller to
  get buffers afterwards
- break the virtio-net device when timeout
- get buffer manually since the virtio core check more_used() instead

Jason Wang (4):
  virtio-net: convert rx mode setting to use workqueue
  virtio_ring: switch to use BAD_RING()
  virtio_ring: introduce a per virtqueue waitqueue
  virtio-net: sleep instead of busy waiting for cvq command

 drivers/net/virtio_net.c     | 90 +++++++++++++++++++++++++++++++-----
 drivers/virtio/virtio_ring.c | 37 +++++++++++++--
 include/linux/virtio.h       |  3 ++
 3 files changed, 115 insertions(+), 15 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2023-01-31  7:33 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-26  7:49 [PATCH 0/4] virtio-net: don't busy poll for cvq command Jason Wang
2022-12-26  7:49 ` [PATCH 1/4] virtio-net: convert rx mode setting to use workqueue Jason Wang
2022-12-27  7:39   ` Michael S. Tsirkin
2022-12-27  9:06     ` Jason Wang
2022-12-30  2:51       ` Jakub Kicinski
2022-12-30  3:40         ` Jason Wang
2022-12-26  7:49 ` [PATCH 2/4] virtio_ring: switch to use BAD_RING() Jason Wang
2022-12-26 23:36   ` Michael S. Tsirkin
2022-12-27  3:51     ` Jason Wang
2022-12-27  7:21       ` Michael S. Tsirkin
2022-12-26  7:49 ` [PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue Jason Wang
2022-12-26 23:34   ` Michael S. Tsirkin
2022-12-27  3:47     ` Jason Wang
2022-12-27  7:19       ` Michael S. Tsirkin
2022-12-27  9:09         ` Jason Wang
2022-12-26 23:38   ` Michael S. Tsirkin
2022-12-27  4:30     ` Jason Wang
2022-12-27  7:33       ` Michael S. Tsirkin
2022-12-27  9:12         ` Jason Wang
2022-12-27  9:38           ` Michael S. Tsirkin
2022-12-28  6:34             ` Jason Wang
2022-12-28 11:53               ` Jason Wang
2022-12-29  7:07                 ` Michael S. Tsirkin
2022-12-29  8:04                   ` Jason Wang
2022-12-29  8:10                     ` Michael S. Tsirkin
2022-12-30  3:43                       ` Jason Wang
2023-01-27 10:35                         ` Michael S. Tsirkin
2023-01-29  5:48                           ` Jason Wang
2023-01-29  7:30                             ` Michael S. Tsirkin
2023-01-30  2:53                               ` Jason Wang
2023-01-30  5:43                                 ` Michael S. Tsirkin
2023-01-30  7:44                                   ` Jason Wang
2023-01-30 11:18                                     ` Michael S. Tsirkin
2023-01-31  3:24                                       ` Jason Wang
2023-01-31  7:32                                         ` Michael S. Tsirkin
     [not found]   ` <20230129073713.5236-1-hdanton@sina.com>
2023-01-30  3:58     ` Jason Wang
2022-12-26  7:49 ` [PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command Jason Wang
2022-12-27  2:19   ` Xuan Zhuo
2022-12-27  4:33     ` Jason Wang
2022-12-27  6:58       ` Michael S. Tsirkin
2022-12-27  9:17         ` Jason Wang
2022-12-27  9:31           ` Michael S. Tsirkin
2022-12-28  6:35             ` Jason Wang
2022-12-28  8:31         ` Xuan Zhuo
2022-12-28 11:41           ` Jason Wang
2022-12-29  2:09             ` Xuan Zhuo
2022-12-29  3:22               ` Jason Wang
2022-12-29  3:41                 ` Xuan Zhuo
2022-12-29  4:08                   ` Jason Wang
2022-12-29  6:13                     ` Xuan Zhuo
2022-12-28  8:39       ` Xuan Zhuo
2022-12-28 11:43         ` Jason Wang
2022-12-29  2:01           ` Xuan Zhuo

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).