Displaying 6 results from an estimated 6 matches for "old_inflight".
2013 Apr 27
2
[PATCH v6 0/2] tcm_vhost flush
Changes in v6:
- Allow device specific fields per vq
- Track cmd per vq
- Do not track evt
- Switch to static array for inflight allocation, completely get rid of the
pain to handle inflight allocation failure.
Asias He (2):
vhost: Allow device specific fields per vq
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
drivers/vhost/net.c | 60 +++++++++++--------
2013 Apr 27
2
[PATCH v6 0/2] tcm_vhost flush
Changes in v6:
- Allow device specific fields per vq
- Track cmd per vq
- Do not track evt
- Switch to static array for inflight allocation, completely get rid of the
pain to handle inflight allocation failure.
Asias He (2):
vhost: Allow device specific fields per vq
tcm_vhost: Wait for pending requests in vhost_scsi_flush()
drivers/vhost/net.c | 60 +++++++++++--------
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...ght(struct vhost_scsi *vs)
+{
+ struct vhost_scsi_inflight *inflight = ACCESS_ONCE(vs->vs_inflight);
+ /* FIXME: possible race window here, if inflight points to old value
+ * before we set the new value in _flush, and the wait_event() runs
+ * before we call atomic_inc(), this way we may free old_inflight
+ * however, but there is still one in flight*/
+ if (inflight)
+ atomic_inc(&inflight->count);
+
+ return inflight;
+}
+
+static bool tcm_vhost_done_inflight(struct vhost_scsi_inflight *inflight)
+{
+ return atomic_read(&inflight->count) == 0;
+}
+
static bool tcm_vhost_check_feat...
2013 Mar 11
4
[PATCH] tcm_vhost: Wait for pending requests in vhost_scsi_flush()
...ght(struct vhost_scsi *vs)
+{
+ struct vhost_scsi_inflight *inflight = ACCESS_ONCE(vs->vs_inflight);
+ /* FIXME: possible race window here, if inflight points to old value
+ * before we set the new value in _flush, and the wait_event() runs
+ * before we call atomic_inc(), this way we may free old_inflight
+ * however, but there is still one in flight*/
+ if (inflight)
+ atomic_inc(&inflight->count);
+
+ return inflight;
+}
+
+static bool tcm_vhost_done_inflight(struct vhost_scsi_inflight *inflight)
+{
+ return atomic_read(&inflight->count) == 0;
+}
+
static bool tcm_vhost_check_feat...
2023 Mar 28
12
[PATCH v6 00/11] vhost: multiple worker support
The following patches were built over linux-next which contains various
vhost patches in mst's tree and the vhost_task patchset in Christian
Brauner's tree:
git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
kernel.user_worker branch:
https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/log/?h=kernel.user_worker
The latter patchset handles the review comment
2020 Sep 24
0
[PATCH 3/8] vhost scsi: alloc cmds per vq instead of session
...; - vq_err(vq, "vhost_scsi_get_tag failed %ld\n",
> + vq_err(vq, "vhost_scsi_get_cmd failed %ld\n",
> PTR_ERR(cmd));
> goto err;
> }
> @@ -1373,6 +1377,83 @@ static void vhost_scsi_flush(struct vhost_scsi *vs)
> wait_for_completion(&old_inflight[i]->comp);
> }
>
> +static void vhost_scsi_destroy_vq_cmds(struct vhost_virtqueue *vq)
> +{
> + struct vhost_scsi_virtqueue *svq = container_of(vq,
> + struct vhost_scsi_virtqueue, vq);
> + struct vhost_scsi_cmd *tv_cmd;
> + unsigned int i;
> +
> + if (!svq-&...