search for: msecs_to_jiffies

Displaying 20 results from an estimated 158 matches for "msecs_to_jiffies".

2017 Sep 13
2
Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m
...+++ b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue.c @@ -326,7 +326,7 @@ nvkm_msgqueue_post(struct nvkm_msgqueue *priv, enum msgqueue_msg_priority prio,         int ret;           if (wait_init && !wait_for_completion_timeout(&priv->init_done, -                                        msecs_to_jiffies(1000))) +                                        msecs_to_jiffies(5000)))                 return -ETIMEDOUT;           queue = priv->func->cmd_queue(priv, prio); diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c b/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c ind...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, goto Cleanup; } - /* FIXME: Need to time-out here */ - osd_waitevent_wait(openInfo->waitevent); + openInfo->wait_condition = 0; + wait_event_timeout(openInfo->waitevent, + openInfo->wait_condition, + msecs_to_jiffies(1000)); + if (openInfo->wait_condition == 0) { + err = -ETIMEDOUT; + goto errorout; + } + if (openInfo->response.open_result.status == 0) DPRINT_INFO(VMBUS, "channel <%p> open success!!", newchannel); @@ -294,7 +299,6 @@ Cleanup: list_del(&openInfo->msglisten...
2011 Feb 11
1
[PATCH 2/3]: Staging: hv: Use native wait primitives
...@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, goto Cleanup; } - /* FIXME: Need to time-out here */ - osd_waitevent_wait(openInfo->waitevent); + openInfo->wait_condition = 0; + wait_event_timeout(openInfo->waitevent, + openInfo->wait_condition, + msecs_to_jiffies(1000)); + if (openInfo->wait_condition == 0) { + err = -ETIMEDOUT; + goto errorout; + } + if (openInfo->response.open_result.status == 0) DPRINT_INFO(VMBUS, "channel <%p> open success!!", newchannel); @@ -294,7 +299,6 @@ Cleanup: list_del(&openInfo->msglisten...
2005 Aug 15
3
[-mm PATCH 2/32] fs: fix-up schedule_timeout() usage
...13-rc5-mm1-dev/fs/cifs/connect.c 2005-08-12 13:42:49.000000000 -0700 @@ -3215,10 +3215,8 @@ cifs_umount(struct super_block *sb, stru } cifs_sb->tcon = NULL; - if (ses) { - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(HZ / 2); - } + if (ses) + schedule_timeout_interruptible(msecs_to_jiffies(500)); if (ses) sesInfoFree(ses); diff -urpN 2.6.13-rc5-mm1/fs/jbd/transaction.c 2.6.13-rc5-mm1-dev/fs/jbd/transaction.c --- 2.6.13-rc5-mm1/fs/jbd/transaction.c 2005-08-07 10:05:22.000000000 -0700 +++ 2.6.13-rc5-mm1-dev/fs/jbd/transaction.c 2005-08-10 15:03:33.000000000 -0700 @@ -1340,8 +134...
2013 Oct 28
3
[PATCH net V2] xen-netback: use jiffies_64 value to calculate credit timeout
...1c..8644aca 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1185,18 +1185,17 @@ out: static bool tx_credit_exceeded(struct xenvif *vif, unsigned size) { - unsigned long now = jiffies; - unsigned long next_credit = - vif->credit_timeout.expires + - msecs_to_jiffies(vif->credit_usec / 1000); + u64 now = get_jiffies_64(); + u64 next_credit = vif->credit_window_start + + (u64)msecs_to_jiffies(vif->credit_usec / 1000); /* Timer could already be pending in rare cases. */ if (timer_pending(&vif->credit_timeout)) return true; /* Passed...
2014 Mar 24
2
[PATCH 06/12] drm/nouveau/ibus: add GK20A support
...er ack\n"); > +} Perhaps I'm being paranoid, but this loop now depends on the frequency of the various clocks involved and therefore might break at some point if the frequencies get sufficiently high. So a slightly safer implementation would use a proper timeout using a combination of msecs_to_jiffies(), time_before() and usleep_range(), like so: timeout = jiffies + msecs_to_jiffies(...); while (time_before(jiffies, timeout)) { command = nv_rd32(...) & 0x3f; if (command == 0) break; usleep_range(...); } if (time_after(jiffies, timeout)) nv_warn(...); This assumes that the...
2014 Jul 14
2
[RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay
...rng); > +} > + > +static void add_early_randomness(struct hwrng *rng) The add/get naming seems awkward in the above hunks. > +{ > + if (!(rng->flags & HWRNG_DELAY_READ_AT_INIT)) > + return get_early_randomness(rng); > + > + schedule_delayed_work(&rng->dwork, msecs_to_jiffies(500)); > +} > + Perhaps instead of rng->flags and a hardcoded delay, we could have rng->seed_delay = msecs_to_jiffies(500) in virtio-rng? Then you can just call unconditionally: schedule_delayed_work(&rng->dwork, rng->seed_delay); I think that would be a more extensible s...
2014 Jul 14
2
[RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay
...rng); > +} > + > +static void add_early_randomness(struct hwrng *rng) The add/get naming seems awkward in the above hunks. > +{ > + if (!(rng->flags & HWRNG_DELAY_READ_AT_INIT)) > + return get_early_randomness(rng); > + > + schedule_delayed_work(&rng->dwork, msecs_to_jiffies(500)); > +} > + Perhaps instead of rng->flags and a hardcoded delay, we could have rng->seed_delay = msecs_to_jiffies(500) in virtio-rng? Then you can just call unconditionally: schedule_delayed_work(&rng->dwork, rng->seed_delay); I think that would be a more extensible s...
2023 May 31
1
[PATCH V2] virtio-fs: Improved request latencies when Virtio queue is full
...88,8 +391,6 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work) if (ret == -ENOMEM || ret == -ENOSPC) { spin_lock(&fsvq->lock); list_add_tail(&req->list, &fsvq->queued_reqs); - schedule_delayed_work(&fsvq->dispatch_work, - msecs_to_jiffies(1)); spin_unlock(&fsvq->lock); return; } @@ -436,8 +437,6 @@ static int send_forget_request(struct virtio_fs_vq *fsvq, pr_debug("virtio-fs: Could not queue FORGET: err=%d. Will try later\n", ret); list_add_tail(&forget->list, &fsvq->queued_...
2017 Sep 13
0
Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m
...u/nvkm/falcon/msgqueue.c > @@ -326,7 +326,7 @@ nvkm_msgqueue_post(struct nvkm_msgqueue *priv, enum > msgqueue_msg_priority prio, > int ret; > > if (wait_init && !wait_for_completion_timeout(&priv->init_done, > - msecs_to_jiffies(1000))) > + msecs_to_jiffies(5000))) > return -ETIMEDOUT; > > queue = priv->func->cmd_queue(priv, prio); > > diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/msgqueue_0137c63d.c > b/drivers/gpu/drm/nouveau/nvk...
2014 Apr 02
1
[PATCH 06/12] drm/nouveau/ibus: add GK20A support
...ing paranoid, but this loop now depends on the frequency >> of the various clocks involved and therefore might break at some point >> if the frequencies get sufficiently high. >> >> So a slightly safer implementation would use a proper timeout using a >> combination of msecs_to_jiffies(), time_before() and usleep_range(), >> like so: >> >> timeout = jiffies + msecs_to_jiffies(...); >> >> while (time_before(jiffies, timeout)) { >> command = nv_rd32(...) & 0x3f; >> if (command == 0) >&g...
2023 Jul 03
2
[PATCH V4] virtio-fs: Improved request latencies when Virtio queue is full
...88,8 +391,6 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work) if (ret == -ENOMEM || ret == -ENOSPC) { spin_lock(&fsvq->lock); list_add_tail(&req->list, &fsvq->queued_reqs); - schedule_delayed_work(&fsvq->dispatch_work, - msecs_to_jiffies(1)); spin_unlock(&fsvq->lock); return; } @@ -436,8 +437,6 @@ static int send_forget_request(struct virtio_fs_vq *fsvq, pr_debug("virtio-fs: Could not queue FORGET: err=%d. Will try later\n", ret); list_add_tail(&forget->list, &fsvq->queued_...
2017 Sep 11
2
Nouveau: kernel hang on Optimus+Intel+NVidia GeForce 1060m
Hi Tobias, On Mon, Sep 11, 2017 at 8:49 PM, Tobias Klausmann < tobias.johannes.klausmann at mni.thm.de> wrote: > Hi, > > i remember seeing the same error with earlier firmware version with a > similar system (GP106) once in a while on boot, yet it does not happen > with newer versions. Maybe you could try to update the firmware to the > latest version from
2023 May 22
1
[PATCH] virtio-fs: Improved request latencies when Virtio queue is full
...88,8 +390,6 @@ static void virtio_fs_request_dispatch_work(struct work_struct *work) if (ret == -ENOMEM || ret == -ENOSPC) { spin_lock(&fsvq->lock); list_add_tail(&req->list, &fsvq->queued_reqs); - schedule_delayed_work(&fsvq->dispatch_work, - msecs_to_jiffies(1)); spin_unlock(&fsvq->lock); return; } @@ -436,8 +436,6 @@ static int send_forget_request(struct virtio_fs_vq *fsvq, pr_debug("virtio-fs: Could not queue FORGET: err=%d. Will try later\n", ret); list_add_tail(&forget->list, &fsvq->queued_...
2019 Oct 30
0
[PATCH 1/3] virtiofs: Use a common function to send forget
...< 0) { + if (ret == -ENOMEM || ret == -ENOSPC) { + pr_debug("virtio-fs: Could not queue FORGET: err=%d." + " Will try later\n", ret); + list_add_tail(&forget->list, &fsvq->queued_reqs); + schedule_delayed_work(&fsvq->dispatch_work, + msecs_to_jiffies(1)); + if (!in_flight) + inc_in_flight_req(fsvq); + /* Queue is full */ + ret = 1; + } else { + pr_debug("virtio-fs: Could not queue FORGET: err=%d." + " Dropping it.\n", ret); + kfree(forget); + if (in_flight) + dec_in_flight_req(fsvq); + } + goto out;...
2008 Feb 04
0
[PATCH] o2net: Reconnect after idle time out.
...? @@ -457,6 +450,8 @@ static void o2net_set_nn_state(struct o2 delay = 0; mlog(ML_CONN, "queueing conn attempt in %lu jiffies\n", delay); queue_delayed_work(o2net_wq, &nn->nn_connect_work, delay); + queue_delayed_work(o2net_wq, &nn->nn_connect_expired, + delay + msecs_to_jiffies(o2net_idle_timeout(sc->sc_node))); } /* keep track of the nn's sc ref for the caller */ @@ -1193,6 +1188,7 @@ static int o2net_check_handshake(struct * shut down already */ if (nn->nn_sc == sc) { o2net_sc_reset_idle_timer(sc); + nn->nn_timeout = 0; o2net_set_nn_state...
2019 Oct 15
7
[PATCH 0/5] virtiofs: Fix couple of deadlocks
Hi, We have couple of places which can result in deadlock. This patch series fixes these. We can be called with fc->bg_lock (for background requests) while submitting a request. This leads to two constraints. - We can't end requests in submitter's context and call fuse_end_request() as it tries to take fc->bg_lock as well. So queue these requests on a list and use a worker to
2020 Jan 15
0
[PATCH] drm/nouveau: gm20b, gp10b: Fix Falcon bootstrapping
.../nouveau/nvkm/subdev/pmu/gm20b.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c @@ -52,8 +52,13 @@ gm20b_pmu_acr_bootstrap_falcon(struct nvkm_falcon *falcon, ret = nvkm_falcon_cmdq_send(pmu->hpq, &cmd.cmd.hdr, gm20b_pmu_acr_bootstrap_falcon_cb, &pmu->subdev, msecs_to_jiffies(1000)); - if (ret >= 0 && ret != cmd.falcon_id) - ret = -EIO; + if (ret >= 0) { + if (ret != cmd.falcon_id) + ret = -EIO; + else + ret = 0; + } + return ret; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c b/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c in...
2009 Aug 31
1
Garbage ERESTARTSYS in dlmdomain.c?
...000 if (status == -EAGAIN) { if (signal_pending(current)) { status = -ERESTARTSYS; goto bail; } if (total_backoff > msecs_to_jiffies(DLM_JOIN_TIMEOUT_MSECS)) { status = -ERESTARTSYS; mlog(ML_NOTICE, "Timed out joining dlm domain " "%s after %u msecs\n", dlm->name, jiffie...
2014 Apr 02
0
[PATCH 06/12] drm/nouveau/ibus: add GK20A support
...; Perhaps I'm being paranoid, but this loop now depends on the frequency > of the various clocks involved and therefore might break at some point > if the frequencies get sufficiently high. > > So a slightly safer implementation would use a proper timeout using a > combination of msecs_to_jiffies(), time_before() and usleep_range(), > like so: > > timeout = jiffies + msecs_to_jiffies(...); > > while (time_before(jiffies, timeout)) { > command = nv_rd32(...) & 0x3f; > if (command == 0) > break...