Displaying 20 results from an estimated 32 matches for "hrtimer_mode_rel".
2007 Dec 12
2
[virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit
...ug(vdebug, "%s: before calling kick %d\n",
__FUNCTION__, __LINE__);
vi->svq->vq_ops->kick(vi->svq);
vi->out_num = 0;
- } else {
- vi->stats.hrtimer_starts++;
- hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
- HRTIMER_MODE_REL);
+ } else if (!hrtimer_is_queued(&vi->tx_timer)) {
+ vi->stats.hrtimer_starts++;
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
}
return 0;
}
2007 Dec 12
2
[virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit
...ug(vdebug, "%s: before calling kick %d\n",
__FUNCTION__, __LINE__);
vi->svq->vq_ops->kick(vi->svq);
vi->out_num = 0;
- } else {
- vi->stats.hrtimer_starts++;
- hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
- HRTIMER_MODE_REL);
+ } else if (!hrtimer_is_queued(&vi->tx_timer)) {
+ vi->stats.hrtimer_starts++;
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
}
return 0;
}
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 10/13] [Mostly resend] virtio additions
...virtio_net.c
@@ -392,10 +392,10 @@ again:
vi->stats.sendq_kicks++;
vi->svq->vq_ops->kick(vi->svq);
vi->out_num = 0;
- } else {
- vi->stats.hrtimer_starts++;
- hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
- HRTIMER_MODE_REL);
+ } else if (!hrtimer_is_queued(&vi->tx_timer)) {
+ vi->stats.hrtimer_starts++;
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
}
return 0;
}
--
1.5.3.3
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 10/13] [Mostly resend] virtio additions
...virtio_net.c
@@ -392,10 +392,10 @@ again:
vi->stats.sendq_kicks++;
vi->svq->vq_ops->kick(vi->svq);
vi->out_num = 0;
- } else {
- vi->stats.hrtimer_starts++;
- hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
- HRTIMER_MODE_REL);
+ } else if (!hrtimer_is_queued(&vi->tx_timer)) {
+ vi->stats.hrtimer_starts++;
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
}
return 0;
}
--
1.5.3.3
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...ps->kick(vi->svq);
+ if (++vi->out_num == vi->out_max) {
+ hrtimer_cancel(&vi->tx_timer);
+ vi->svq->vq_ops->kick(vi->svq);
+ vi->out_num = 0;
+ } else
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
return 0;
}
@@ -363,6 +398,10 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_napi_add(dev, &vi->napi, virtnet_poll, 16);
vi->dev = dev;
vi->vdev = vdev;
+ hrtimer_init(&vi->tx_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
+ vi->tx_tim...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...ps->kick(vi->svq);
+ if (++vi->out_num == vi->out_max) {
+ hrtimer_cancel(&vi->tx_timer);
+ vi->svq->vq_ops->kick(vi->svq);
+ vi->out_num = 0;
+ } else
+ hrtimer_start(&vi->tx_timer, ktime_set(0,500000),
+ HRTIMER_MODE_REL);
return 0;
}
@@ -363,6 +398,10 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_napi_add(dev, &vi->napi, virtnet_poll, 16);
vi->dev = dev;
vi->vdev = vdev;
+ hrtimer_init(&vi->tx_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
+ vi->tx_tim...
2008 Jan 03
1
[PATCH] Use memset(0) instead of setting cb_mode explicitly
...t.c
@@ -434,9 +434,9 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
vi->dev = dev;
vi->vdev = vdev;
+ memset(&vi->tx_timer, 0, sizeof(vi->tx_timer));
hrtimer_init(&vi->tx_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
vi->tx_timer.function = kick_xmit;
- vi->tx_timer.cb_mode = HRTIMER_CB_SOFTIRQ;
vi->out_max = -1U;
tasklet_init(&vi->xmit_free, xmit_free, (unsigned long)vi);
2008 Jan 03
1
[PATCH] Use memset(0) instead of setting cb_mode explicitly
...t.c
@@ -434,9 +434,9 @@ static int virtnet_probe(struct virtio_device *vdev)
netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
vi->dev = dev;
vi->vdev = vdev;
+ memset(&vi->tx_timer, 0, sizeof(vi->tx_timer));
hrtimer_init(&vi->tx_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
vi->tx_timer.function = kick_xmit;
- vi->tx_timer.cb_mode = HRTIMER_CB_SOFTIRQ;
vi->out_max = -1U;
tasklet_init(&vi->xmit_free, xmit_free, (unsigned long)vi);
2020 Jun 08
0
[vhost:vhost 18/52] drivers/virtio/virtio_mem.c:1391:5: warning: Variable 'rc' is reassigned a value before the old one has been used.
...>host_resp);
1382 vm->vdev = vdev;
1383 INIT_WORK(&vm->wq, virtio_mem_run_wq);
1384 mutex_init(&vm->hotplug_mutex);
1385 INIT_LIST_HEAD(&vm->next);
1386 spin_lock_init(&vm->removal_lock);
1387 hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1388 vm->retry_timer.function = virtio_mem_timer_expired;
1389
1390 /* register the virtqueue */
> 1391 rc = virtio_mem_init_vq(vm);
1392 if (rc)
1393 goto out_free_vm;
1394
1395 /* initialize the device by querying the config */
1396 rc = virtio_mem_init(vm);
13...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...>host_resp);
1380 vm->vdev = vdev;
1381 INIT_WORK(&vm->wq, virtio_mem_run_wq);
1382 mutex_init(&vm->hotplug_mutex);
1383 INIT_LIST_HEAD(&vm->next);
1384 spin_lock_init(&vm->removal_lock);
1385 hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1386 vm->retry_timer.function = virtio_mem_timer_expired;
1387
1388 /* register the virtqueue */
1389 rc = virtio_mem_init_vq(vm);
1390 if (rc)
1391 goto out_free_vm;
1392
1393 /* initialize the device by querying the config */
1394 rc = virtio_mem_init(vm);
1395...
2020 May 05
2
[vhost:vhost 8/22] drivers/virtio/virtio_mem.c:1375:20: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'?
...>host_resp);
1380 vm->vdev = vdev;
1381 INIT_WORK(&vm->wq, virtio_mem_run_wq);
1382 mutex_init(&vm->hotplug_mutex);
1383 INIT_LIST_HEAD(&vm->next);
1384 spin_lock_init(&vm->removal_lock);
1385 hrtimer_init(&vm->retry_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
1386 vm->retry_timer.function = virtio_mem_timer_expired;
1387
1388 /* register the virtqueue */
1389 rc = virtio_mem_init_vq(vm);
1390 if (rc)
1391 goto out_free_vm;
1392
1393 /* initialize the device by querying the config */
1394 rc = virtio_mem_init(vm);
1395...
2014 May 14
0
[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface
...= wait_event_interruptible_timeout(
- priv->waiting,
- nouveau_fence_done(fence),
- timeout);
- } else {
- ret = wait_event_timeout(priv->waiting,
- nouveau_fence_done(fence),
- timeout);
- }
- }
+ kt = ktime_set(0, sleep_time);
+ schedule_hrtimeout(&kt, HRTIMER_MODE_REL);
+ sleep_time *= 2;
+ if (sleep_time > NSEC_PER_MSEC)
+ sleep_time = NSEC_PER_MSEC;
- if (ret >= 0) {
- fence->timeout = jiffies + ret;
- if (time_after_eq(jiffies, fence->timeout))
- ret = -EBUSY;
- }
- } else {
- if (intr) {
- ret = wait_event_interruptible(priv->...
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
Hi:
This is a new version of trying to enable tx interrupts for
virtio-net.
We used to try to avoid tx interrupts and orphan packets before
transmission for virtio-net. This breaks socket accounting and can
lead serveral other side effects e.g:
- Several other functions which depends on socket accounting can not
work correctly (e.g TCP Small Queue)
- No tx completion which make BQL or
2015 Feb 09
10
[PATCH RFC v5 net-next 0/6] enable tx interrupts for virtio-net
Hi:
This is a new version of trying to enable tx interrupts for
virtio-net.
We used to try to avoid tx interrupts and orphan packets before
transmission for virtio-net. This breaks socket accounting and can
lead serveral other side effects e.g:
- Several other functions which depends on socket accounting can not
work correctly (e.g TCP Small Queue)
- No tx completion which make BQL or
2023 Jul 31
1
[PATCH] virtio: a new vcpu watchdog driver
...detector->vdev, ticks);
> +
> + /* Pet the stall detector at half of its expiration timeout
> + * to prevent spurious resets.
> + */
> + ping_timeout_ms = vcpu_stall_config.stall_timeout_sec *
> + MSEC_PER_SEC / 2;
> +
> + hrtimer_init(vcpu_hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
> + vcpu_hrtimer->function = vcpu_stall_detect_timer_fn;
> +
> + vcpu_stall->pet_event.is_initialized = true;
> +
> + spin_lock(&vcpu_stall->lock);
> + vcpu_stall->pet_event.cpu_id = cpu;
> + sg_init_one(&sg, &vcpu_stall->pet_event, sizeof(vcpu_stal...
2014 Dec 01
9
[PATCH RFC v4 net-next 0/5] virtio_net: enabling tx interrupts
Hello:
We used to orphan packets before transmission for virtio-net. This breaks
socket accounting and can lead serveral functions won't work, e.g:
- Byte Queue Limit depends on tx completion nofication to work.
- Packet Generator depends on tx completion nofication for the last
transmitted packet to complete.
- TCP Small Queue depends on proper accounting of sk_wmem_alloc to work.
This
2014 Dec 01
9
[PATCH RFC v4 net-next 0/5] virtio_net: enabling tx interrupts
Hello:
We used to orphan packets before transmission for virtio-net. This breaks
socket accounting and can lead serveral functions won't work, e.g:
- Byte Queue Limit depends on tx completion nofication to work.
- Packet Generator depends on tx completion nofication for the last
transmitted packet to complete.
- TCP Small Queue depends on proper accounting of sk_wmem_alloc to work.
This
2015 May 25
8
[RFC V7 PATCH 0/7] enable tx interrupts for virtio-net
Hi:
This is a new version of trying to enable tx interrupts for
virtio-net.
We used to try to avoid tx interrupts and orphan packets before
transmission for virtio-net. This breaks socket accounting and can
lead serveral other side effects e.g:
- Several other functions which depends on socket accounting can not
work correctly (e.g TCP Small Queue)
- No tx completion which make BQL or packet
2015 May 25
8
[RFC V7 PATCH 0/7] enable tx interrupts for virtio-net
Hi:
This is a new version of trying to enable tx interrupts for
virtio-net.
We used to try to avoid tx interrupts and orphan packets before
transmission for virtio-net. This breaks socket accounting and can
lead serveral other side effects e.g:
- Several other functions which depends on socket accounting can not
work correctly (e.g TCP Small Queue)
- No tx completion which make BQL or packet
2020 Mar 02
0
[PATCH v1 02/11] virtio-mem: Paravirtualized memory hotplug
...*/
+ break;
+ case -EBUSY:
+ /*
+ * The hypervisor cannot process our request right now
+ * (e.g., out of memory, migrating).
+ */
+ case -ENOMEM:
+ /* Out of memory, try again later. */
+ hrtimer_start(&vm->retry_timer,
+ ms_to_ktime(VIRTIO_MEM_RETRY_TIMER_MS),
+ HRTIMER_MODE_REL);
+ break;
+ case -EAGAIN:
+ /* Retry immediately (e.g., the config changed). */
+ goto retry;
+ default:
+ /* Unknown error, mark as broken */
+ dev_err(&vm->vdev->dev,
+ "unknown error, marking device broken: %d\n", rc);
+ vm->broken = true;
+ }
+}
+
+static enum hr...