Displaying 20 results from an estimated 273 matches for "workqueue_struct".
2024 Feb 22
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
...vers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 8a6d94c8b163..b43619a213a4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -261,6 +261,9 @@ struct nouveau_drm {
/* Workqueue used for channel schedulers. */
struct workqueue_struct *sched_wq;
+ /* Workqueue used to signal fences. */
+ struct workqueue_struct *fence_wq;
+
/* context for accelerated drm-internal operations */
struct nouveau_channel *cechan;
struct nouveau_channel *channel;
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/no...
2024 Feb 23
1
[PATCH] drm/nouveau: use dedicated wq for fence uevents work
....h
> > index 8a6d94c8b163..b43619a213a4 100644
> > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
> > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
> > @@ -261,6 +261,9 @@ struct nouveau_drm {
> > /* Workqueue used for channel schedulers. */
> > struct workqueue_struct *sched_wq;
> >
> > + /* Workqueue used to signal fences. */
> > + struct workqueue_struct *fence_wq;
> > +
> > /* context for accelerated drm-internal operations */
> > struct nouveau_channel *cechan;
> > struct nouveau_c...
2024 Feb 02
3
[PATCH 1/2] drm/nouveau: don't fini scheduler if not initialized
...uveau/nouveau_sched.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sched.c
@@ -398,7 +398,7 @@ static const struct drm_sched_backend_ops nouveau_sched_ops = {
.free_job = nouveau_sched_free_job,
};
-int
+static int
nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
struct workqueue_struct *wq, u32 credit_limit)
{
@@ -453,7 +453,30 @@ nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
return ret;
}
-void
+int
+nouveau_sched_create(struct nouveau_sched **psched, struct nouveau_drm *drm,
+ struct workqueue_struct *wq, u32 credit_limit)
+{
+ struct nouv...
2018 Feb 11
0
[PATCH 1/5] workqueue: Allow retrieval of current task's work struct
...--git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 4a54ef96aff5..bc0cda180c8b 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -465,6 +465,7 @@ extern bool cancel_delayed_work_sync(struct delayed_work *dwork);
extern void workqueue_set_max_active(struct workqueue_struct *wq,
int max_active);
+extern struct work_struct *current_work(void);
extern bool current_is_workqueue_rescuer(void);
extern bool workqueue_congested(int cpu, struct workqueue_struct *wq);
extern unsigned int work_busy(struct work_struct *work);
diff --git a/kernel/workqueue.c b/kernel...
2023 Mar 11
2
[PATCH 00/11] Use copy_process in vhost layer
On Fri, Mar 10, 2023 at 2:04?PM Mike Christie
<michael.christie at oracle.com> wrote:
>
> The following patches were made over Linus's tree and apply over next. They
> allow the vhost layer to use copy_process instead of using
> workqueue_structs to create worker threads for VM's devices.
Ok, all these patches looked fine to me from a quick scan - nothing
that I reacted to as objectionable, and several of them looked like
nice cleanups.
The only one I went "Why do you do it that way" for was in 10/11
(entirely internal to v...
2025 Jan 22
5
[PATCH] drm/sched: Use struct for drm_sched_init() params
...schedulers
- * @name: name used for debugging
- * @dev: target &struct device
+ * @params: scheduler initialization parameters
*
* Return 0 on success, otherwise error code.
*/
int drm_sched_init(struct drm_gpu_scheduler *sched,
- const struct drm_sched_backend_ops *ops,
- struct workqueue_struct *submit_wq,
- u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
- long timeout, struct workqueue_struct *timeout_wq,
- atomic_t *score, const char *name, struct device *dev)
+ const struct drm_sched_init_params *params)
{
int i;
- sched->ops = ops;
- sched->credit_limi...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...Boris Brezillon wrote:
> > On Wed, 22 Jan 2025 15:08:20 +0100
> > Philipp Stanner <phasta at kernel.org> wrote:
> >
> > > ?int drm_sched_init(struct drm_gpu_scheduler *sched,
> > > - ?? const struct drm_sched_backend_ops *ops,
> > > - ?? struct workqueue_struct *submit_wq,
> > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > + const struct drm_sched_init_params *params);...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...0, Boris Brezillon wrote:
> > On Wed, 22 Jan 2025 15:08:20 +0100
> > Philipp Stanner <phasta at kernel.org> wrote:
> >
> > > ?int drm_sched_init(struct drm_gpu_scheduler *sched,
> > > - ?? const struct drm_sched_backend_ops *ops,
> > > - ?? struct workqueue_struct *submit_wq,
> > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > + const struct drm_sched_init_params *params);
&g...
2025 Jan 23
0
[PATCH] drm/sched: Use struct for drm_sched_init() params
...2025 15:08:20 +0100
> > > > Philipp Stanner <phasta at kernel.org> wrote:
> > > >
> > > > > ?int drm_sched_init(struct drm_gpu_scheduler *sched,
> > > > > - ?? const struct drm_sched_backend_ops *ops,
> > > > > - ?? struct workqueue_struct *submit_wq,
> > > > > - ?? u32 num_rqs, u32 credit_limit, unsigned int hang_limit,
> > > > > - ?? long timeout, struct workqueue_struct *timeout_wq,
> > > > > - ?? atomic_t *score, const char *name, struct device *dev);
> > > > > + const s...
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr.
On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote:
> > + /* The workqueue servicing the balloon. */
> > + struct workqueue_struct *wq;
> > + struct work_struct wq_work;
>
> We could use system_freezable_wq instead.
> I do agree a dedicated wq is better since this can get blocked
> for a long time while allocating memory.
> However, please add a comment to this effect.
system_freezable_wq should be fine....
2014 Nov 14
1
[PATCH v2] virtio_balloon: Convert "vballon" kthread into a workqueue
Hello, Michael, Petr.
On Wed, Nov 12, 2014 at 03:32:04PM +0200, Michael S. Tsirkin wrote:
> > + /* The workqueue servicing the balloon. */
> > + struct workqueue_struct *wq;
> > + struct work_struct wq_work;
>
> We could use system_freezable_wq instead.
> I do agree a dedicated wq is better since this can get blocked
> for a long time while allocating memory.
> However, please add a comment to this effect.
system_freezable_wq should be fine....
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...@
#include <linux/scatterlist.h>
#include <linux/string_helpers.h>
#include <scsi/scsi_cmnd.h>
+#include <linux/idr.h>
#define PART_BITS 4
-static int major, index;
+static int major;
+static DEFINE_SPINLOCK(vd_index_lock);
+static DEFINE_IDA(vd_index_ida);
+
struct workqueue_struct *virtblk_wq;
struct virtio_blk
@@ -23,6 +27,7 @@ struct virtio_blk
/* The disk structure for the kernel. */
struct gendisk *disk;
+ u32 index;
/* Request tracking. */
struct list_head reqs;
@@ -343,12 +348,26 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
struct...
2011 Jun 01
6
[PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index
...@
#include <linux/scatterlist.h>
#include <linux/string_helpers.h>
#include <scsi/scsi_cmnd.h>
+#include <linux/idr.h>
#define PART_BITS 4
-static int major, index;
+static int major;
+static DEFINE_SPINLOCK(vd_index_lock);
+static DEFINE_IDA(vd_index_ida);
+
struct workqueue_struct *virtblk_wq;
struct virtio_blk
@@ -23,6 +27,7 @@ struct virtio_blk
/* The disk structure for the kernel. */
struct gendisk *disk;
+ u32 index;
/* Request tracking. */
struct list_head reqs;
@@ -343,12 +348,26 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
struct...
2019 Nov 21
2
[PATCH net-next 4/6] vsock: add vsock_loopback transport
...ty in
> > virtio_transport_common.c? This doesn't have anything to do with virtio
> > :).
> >
>
> Completely agree, new transports could use it to handle the protocol without
> reimplementing things already done.
>
> > > +
> > > +static struct workqueue_struct *vsock_loopback_workqueue;
> > > +static struct vsock_loopback *the_vsock_loopback;
> >
> > the_vsock_loopback could be a static global variable (not a pointer) and
> > vsock_loopback_workqueue could also be included in the struct.
> >
> > The RCU pointer is...
2019 Nov 21
2
[PATCH net-next 4/6] vsock: add vsock_loopback transport
...ty in
> > virtio_transport_common.c? This doesn't have anything to do with virtio
> > :).
> >
>
> Completely agree, new transports could use it to handle the protocol without
> reimplementing things already done.
>
> > > +
> > > +static struct workqueue_struct *vsock_loopback_workqueue;
> > > +static struct vsock_loopback *the_vsock_loopback;
> >
> > the_vsock_loopback could be a static global variable (not a pointer) and
> > vsock_loopback_workqueue could also be included in the struct.
> >
> > The RCU pointer is...
2023 Mar 28
0
[PATCH v4 05/11] vduse: Support set_vq_affinity callback
...; struct work_struct kick;
> + int irq_effective_cpu;
> + struct cpumask irq_affinity;
> };
>
> struct vduse_dev;
> @@ -128,6 +132,7 @@ static struct class *vduse_class;
> static struct cdev vduse_ctrl_cdev;
> static struct cdev vduse_cdev;
> static struct workqueue_struct *vduse_irq_wq;
> +static struct workqueue_struct *vduse_irq_bound_wq;
>
> static u32 allowed_device_id[] = {
> VIRTIO_ID_BLOCK,
> @@ -708,6 +713,15 @@ static u32 vduse_vdpa_get_generation(struct vdpa_device *vdpa)
> return dev->generation;
> }
>
> +stat...
2019 Nov 21
2
[PATCH net-next 4/6] vsock: add vsock_loopback transport
...;linux/spinlock.h>
> +#include <linux/module.h>
> +#include <linux/list.h>
> +#include <linux/virtio_vsock.h>
Is it time to rename the generic functionality in
virtio_transport_common.c? This doesn't have anything to do with virtio
:).
> +
> +static struct workqueue_struct *vsock_loopback_workqueue;
> +static struct vsock_loopback *the_vsock_loopback;
the_vsock_loopback could be a static global variable (not a pointer) and
vsock_loopback_workqueue could also be included in the struct.
The RCU pointer is really a way to synchronize vsock_loopback_send_pkt()
and v...
2019 Nov 21
2
[PATCH net-next 4/6] vsock: add vsock_loopback transport
...;linux/spinlock.h>
> +#include <linux/module.h>
> +#include <linux/list.h>
> +#include <linux/virtio_vsock.h>
Is it time to rename the generic functionality in
virtio_transport_common.c? This doesn't have anything to do with virtio
:).
> +
> +static struct workqueue_struct *vsock_loopback_workqueue;
> +static struct vsock_loopback *the_vsock_loopback;
the_vsock_loopback could be a static global variable (not a pointer) and
vsock_loopback_workqueue could also be included in the struct.
The RCU pointer is really a way to synchronize vsock_loopback_send_pkt()
and v...
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...ons(+), 1 deletion(-)
diff --git a/drivers/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
index 058fbe2..25fc412 100644
--- a/drivers/vdpa/mlx5/core/mlx5_vdpa.h
+++ b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
@@ -96,6 +96,7 @@ struct mlx5_vdpa_dev {
struct mlx5_control_vq cvq;
struct workqueue_struct *wq;
unsigned int group2asid[MLX5_VDPA_NUMVQ_GROUPS];
+ bool suspended;
};
int mlx5_vdpa_alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid);
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 3a6dbbc6..daac3ab 100644
--- a/drivers/vdpa/mlx5/net/mlx5_v...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...s/vdpa/mlx5/core/mlx5_vdpa.h b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
> index 058fbe2..25fc412 100644
> --- a/drivers/vdpa/mlx5/core/mlx5_vdpa.h
> +++ b/drivers/vdpa/mlx5/core/mlx5_vdpa.h
> @@ -96,6 +96,7 @@ struct mlx5_vdpa_dev {
> struct mlx5_control_vq cvq;
> struct workqueue_struct *wq;
> unsigned int group2asid[MLX5_VDPA_NUMVQ_GROUPS];
> + bool suspended;
> };
>
> int mlx5_vdpa_alloc_pd(struct mlx5_vdpa_dev *dev, u32 *pdn, u16 uid);
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 3a6dbbc6..daac...