search for: time_after_eq

Displaying 20 results from an estimated 42 matches for "time_after_eq".

2013 Oct 16
0
答复: Re: DomU's network interface will hung when Dom0 running 32bit
...#39;'s network > >> interface, which send lesser package, will hung if Dom0 running > >> 32bit and DomU''s up-time is very long. I think that one jiffies > >> overflow bug exist in the function tx_credit_exceeded(). > >> I know the inline function time_after_eq(a,b) will process jiffies > >> overflow, but the function have one limit a should little that (b + > >> MAX_SIGNAL_LONG). If a large than the value, time_after_eq will > >> return false. The MAX_SINGNAL_LONG should be 0x7fffffff at 32-bit > >> machine. > >&...
2013 Oct 28
3
[PATCH net V2] xen-netback: use jiffies_64 value to calculate credit timeout
time_after_eq() only works if the delta is < MAX_ULONG/2. For a 32bit Dom0, if netfront sends packets at a very low rate, the time between subsequent calls to tx_credit_exceeded() may exceed MAX_ULONG/2 and the test for timer_after_eq() will be incorrect. Credit will not be replenished and the guest may beco...
2014 May 14
0
[RFC PATCH v1 07/16] drm/nouveau: rework to new fence interface
...eau_fence_priv *priv = chan->drm->fence; - struct nouveau_eventh *handler; - int ret = 0; + t = jiffies; - ret = nouveau_event_new(pfifo->uevent, 0, - nouveau_fence_wait_uevent_handler, - priv, &handler); - if (ret) - return ret; + if (wait != MAX_SCHEDULE_TIMEOUT && time_after_eq(t, timeout)) { + __set_current_state(TASK_RUNNING); + return 0; + } - nouveau_event_get(handler); + __set_current_state(intr ? TASK_INTERRUPTIBLE : + TASK_UNINTERRUPTIBLE); - if (fence->timeout) { - unsigned long timeout = fence->timeout - jiffies; - - if (time_before(jiffi...
2004 May 09
0
tcng version 9m
...m 2.4.25 to 2.4.26 - scripts/compatibility.sh: added 2.4.26 - installation example in README now also mentions downloading the iproute2 tarball from Debian - configure and scripts/minisrc.sh now also recognize the Debian iproute tarball - tcsim/setup.klib: added "time_after" and "time_after_eq" to linux/sched.h - tcsim/setup.klib: converts dsfield.h to remove bare newlines from strings (needed to build tcsim with old kernel sources and a new gcc) - if_u32.c:dump_and now checks if any but the last && term changes the offset group (tests/tcng-9m; updated tests/tcng-2i, rep...
2012 Apr 25
5
[PATCH v2 4/4] drm/nouveau: gpu lockup recovery
...t;dev; unsigned long timeout = fence->timeout; unsigned long sleep_time = NSEC_PER_MSEC / 1000; ktime_t t; int ret = 0; + if (nouveau_gpu_reset_in_progress(dev)) + timeout = jiffies + DRM_HZ / 5; + while (1) { if (__nouveau_fence_signalled(sync_obj, sync_arg)) break; if (time_after_eq(jiffies, timeout)) { - ret = -EBUSY; + if (!nouveau_gpu_reset_in_progress(dev)) + ret = -EIO; break; } diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index ed52a6f..f9bbcc0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/g...
2013 Jun 24
3
[PATCH v2] xen-netback: add a pseudo pps rate limit
...unsigned long next_credit = + vif->credit_timeout.expires + + msecs_to_jiffies(vif->credit_usec / 1000); + + /* Timer could already be pending in rare cases. */ + if (timer_pending(&vif->credit_timeout)) + return true; + + /* Passed the point where we can replenish credit? */ + if (time_after_eq(now, next_credit)) { + vif->credit_timeout.expires = now; + tx_add_packets(vif); + } + + /* Not enough slot to send right now? Set a callback. */ + if (vif->remaining_packets < 1) { + vif->credit_timeout.data = + (unsigned long)vif; + vif->credit_timeout.function = + tx_c...
2012 Apr 22
2
[RFC PATCH 5/5] drm/nouveau: gpu lockup recovery
...t = fence->emitted_at + 3 * DRM_HZ; unsigned long sleep_time = NSEC_PER_MSEC / 1000; ktime_t t; int ret = 0; + if (nouveau_gpu_reset_in_progress(dev)) + timeout = fence->emitted_at + DRM_HZ / 5; + while (1) { if (__nouveau_fence_signalled(sync_obj, sync_arg)) break; if (time_after_eq(jiffies, timeout)) { - ret = -EBUSY; + if (!nouveau_gpu_reset_in_progress(dev)) + ret = -EIO; break; } diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index ed52a6f..f9bbcc0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/g...
2014 May 14
0
[RFC PATCH v1 10/16] drm/vmwgfx: get rid of different types of fence_flags entirely
...ignaled |= DRM_VMW_FENCE_FLAG_EXEC; + fence->signaled = 1; INIT_LIST_HEAD(&action_list); list_splice_init(&fence->seq_passed_actions, &action_list); @@ -716,14 +706,14 @@ int vmw_fence_obj_wait_ioctl(struct drm_device *dev, void *data, timeout = jiffies; if (time_after_eq(timeout, (unsigned long)arg->kernel_cookie)) { - ret = ((vmw_fence_obj_signaled(fence, arg->flags)) ? + ret = ((vmw_fence_obj_signaled(fence)) ? 0 : -EBUSY); goto out; } timeout = (unsigned long)arg->kernel_cookie - timeout; - ret = vmw_fence_obj_wait(fence, arg->...
2012 Jun 26
6
[PATCH] Add a page cache-backed balloon device driver.
...ld_stop() + || freezing(current)); + if (config_need_stats(vb)) + update_free_and_total(vb); + if (diff > 0) { + unsigned long reclaim_time = vb->last_reclaim + 2 * HZ; + /* + * Don't fill the balloon if a page reclaim happened in + * the past 2 seconds. + */ + if (time_after_eq(reclaim_time, jiffies)) { + /* Inflating too fast--sleep and skip. */ + msleep(500); + } else { + fill_balloon(vb, diff); + } + } else if (diff < 0 && config_pages(vb) == 0) { + /* + * Here we are specifically looking to detect the case + * where there are pages in...
2012 Jun 26
6
[PATCH] Add a page cache-backed balloon device driver.
...ld_stop() + || freezing(current)); + if (config_need_stats(vb)) + update_free_and_total(vb); + if (diff > 0) { + unsigned long reclaim_time = vb->last_reclaim + 2 * HZ; + /* + * Don't fill the balloon if a page reclaim happened in + * the past 2 seconds. + */ + if (time_after_eq(reclaim_time, jiffies)) { + /* Inflating too fast--sleep and skip. */ + msleep(500); + } else { + fill_balloon(vb, diff); + } + } else if (diff < 0 && config_pages(vb) == 0) { + /* + * Here we are specifically looking to detect the case + * where there are pages in...
2019 Feb 22
0
[PATCH] tpm: Add driver for TPM over virtio
...ev, "kick failed; will retry\n"); > + return -EBUSY; > + } > + dev->needs_kick = false; > + } > + > + while (!dev->driver_has_buffer) { > + unsigned long now = jiffies; > + > + /* Check timeout, otherwise `deadline - now` may underflow. */ > + if time_after_eq(now, deadline) { > + dev_warn(&chip->dev, "timed out %s\n", why); > + dev->needs_kick = true; > + return -ETIMEDOUT; > + } > + > + /* > + * Wait to be signaled by virtio callback. > + * > + * Positive ret is jiffies remaining until timeou...
2010 Aug 04
6
[PATCH -v2 0/3] jbd2 scalability patches
This version fixes three bugs in the 2nd patch of this series that caused kernel BUG when the system was under race. We weren't accounting with t_oustanding_credits correctly, and there were race conditions caused by the fact the I had overlooked the fact that __jbd2_log_wait_for_space() and jbd2_get_transaction() requires j_state_lock to be write locked. Theodore Ts'o (3): jbd2: Use
2012 Jul 25
0
No subject
...gt;last_reclaim + 2 * HZ; > >> + /* > >> + * Don't fill the balloon if a page reclaim happened in > >> + * the past 2 seconds. > >> + */ > >> + if (time_after_eq(reclaim_time, jiffies)) { > >> + /* Inflating too fast--sleep and skip. */ > >> + msleep(500); > >> + } else { > >> + fill_balloon(vb, diff); > >> +...
2012 Jul 25
0
No subject
...gt;last_reclaim + 2 * HZ; > >> + /* > >> + * Don't fill the balloon if a page reclaim happened in > >> + * the past 2 seconds. > >> + */ > >> + if (time_after_eq(reclaim_time, jiffies)) { > >> + /* Inflating too fast--sleep and skip. */ > >> + msleep(500); > >> + } else { > >> + fill_balloon(vb, diff); > >> +...
2019 Feb 22
0
[PATCH] tpm: Add driver for TPM over virtio
...+ } > >> + dev->needs_kick = false; > >> + } > >> + > >> + while (!dev->driver_has_buffer) { > >> + unsigned long now = jiffies; > >> + > >> + /* Check timeout, otherwise `deadline - now` may underflow. */ > >> + if time_after_eq(now, deadline) { > >> + dev_warn(&chip->dev, "timed out %s\n", why); > >> + dev->needs_kick = true; > >> + return -ETIMEDOUT; > >> + } > >> + > >> + /* > >> + * Wait to be signaled by virtio callback. >...
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
2006 Aug 02
10
[PATCH 0/6] htb: cleanup
The HTB scheduler code is a mess, this patch set does some basic house cleaning. The first four should cause no code change, but the last two need more testing. -- Stephen Hemminger <shemminger@osdl.org> "And in the Packet there writ down that doome" - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to
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
2008 May 19
20
[PATCH 00/23] ia64/xen domU take 6
Hi. This patchset implements ia64/xen domU support based on ia64/pv_ops frame work which was sent as another patchest. Changes from take 5 are rebased to Linux 2.6.26-rc3, bug fix ivt.S paravirtualization and multi entry point support. I believe these patches can be applied to the linux ia64 repository. This patchset does the followings. - Some preparation work. Mainly importing header files to