Displaying 12 results from an estimated 12 matches for "ktime_set".
Did you mean:
ktime_get
2007 Dec 12
2
[virtio-net][PATCH] Don't arm tx hrtimer with a constant 500us each transmit
...10 +405,10 @@ again:
virtio_debug(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
...10 +405,10 @@ again:
virtio_debug(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
...vers/net/virtio_net.c
+++ b/drivers/net/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);
}...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 10/13] [Mostly resend] virtio additions
...vers/net/virtio_net.c
+++ b/drivers/net/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);
}...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...TX_BUSY;
}
- vi->svq->vq_ops->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_...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...TX_BUSY;
}
- vi->svq->vq_ops->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_...
2014 May 14
0
[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface
...(jiffies, fence->timeout)) {
- if (intr) {
- ret = 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;
- }
- } e...
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
2014 May 14
17
[RFC PATCH v1 00/16] Convert all ttm drivers to use the new reservation interface
This series depends on the previously posted reservation api patches.
2 of them are not yet in for-next-fences branch of
git://git.linaro.org/people/sumit.semwal/linux-3.x.git
The missing patches are still in my vmwgfx_wip branch at
git://people.freedesktop.org/~mlankhorst/linux
All ttm drivers are converted to the fence api, fence_lock is removed
and rcu is used in its place.
qxl is the first
2014 Jul 31
19
[PATCH 01/19] fence: add debugging lines to fence_is_signaled for the callback
fence_is_signaled callback should support being run in
atomic context, but not in irq context.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
---
include/linux/fence.h | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/include/linux/fence.h b/include/linux/fence.h
index d174585b874b..c1a4519ba2f5 100644
---
2014 Jul 09
22
[PATCH 00/17] Convert TTM to the new fence interface.
This series applies on top of the driver-core-next branch of
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
Before converting ttm to the new fence interface I had to fix some
drivers to require a reservation before poking with fence_obj.
After flipping the switch RCU becomes available instead, and
the extra reservations can be dropped again. :-)
I've done at least basic