search for: current_work

Displaying 19 results from an estimated 19 matches for "current_work".

2018 Feb 11
0
[PATCH 1/5] workqueue: Allow retrieval of current task's work struct
...aff5..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/workqueue.c index 017044c26233..bb9a519cbf50 100644 --- a/kernel/workque...
2018 Jul 17
3
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...> > > > static inline bool pm_runtime_status_suspending(struct device *dev) > > { > > return dev->power.runtime_status == RPM_SUSPENDING; > > } > > > > static inline bool is_pm_work(struct device *dev) > > { > > struct work_struct *work = current_work(); > > > > return work && work->func == dev->power.work; > > } > > > > Then adding this to nvkm_i2c_aux_acquire(): > > > > struct device *dev = pad->i2c->subdev.device->dev; > > > > if (!(is_pm_work(dev) &&...
2011 Jul 16
1
gothic 1.08 wine 1.2.3
...=============================== Startup Options: =============================================== CALLSTACK : ============================================================== 0073:00740D90 (0x00000015 0x00001000 0x00000008 0x007F56EC) Gothic.exe, zCVertexBuffer_D3D::Create()+240 byte(s), D:\dev\gothic\current_work\ZenGin\_Kurt\zRndD3D_Vertexbuffer.cpp, line 123+5 byte(s) 0073:005E3814 (0x00000015 0x00001000 0xFFFFFFFF 0x007F56EC) Gothic.exe, zCVertexBufferDyn::zCVertexBufferDyn()+68 byte(s), D:\dev\gothic\current_work\ZenGin\_Dieter\zVertexBuffer.cpp, line 148 0073:005B78A0 (0x00000001 0x00000000 0x0055D8DA...
2018 Jul 17
4
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...e technique I used in d61a5c106351 by adding the following to include/linux/pm_runtime.h: static inline bool pm_runtime_status_suspending(struct device *dev) { return dev->power.runtime_status == RPM_SUSPENDING; } static inline bool is_pm_work(struct device *dev) { struct work_struct *work = current_work(); return work && work->func == dev->power.work; } Then adding this to nvkm_i2c_aux_acquire(): struct device *dev = pad->i2c->subdev.device->dev; if (!(is_pm_work(dev) && pm_runtime_status_suspending(dev))) { ret = pm_runtime_get_sync(dev); if (ret < 0 &...
2018 Jul 17
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...bool pm_runtime_status_suspending(struct device *dev) > > > { > > > return dev->power.runtime_status == RPM_SUSPENDING; > > > } > > > > > > static inline bool is_pm_work(struct device *dev) > > > { > > > struct work_struct *work = current_work(); > > > > > > return work && work->func == dev->power.work; > > > } > > > > > > Then adding this to nvkm_i2c_aux_acquire(): > > > > > > struct device *dev = pad->i2c->subdev.device->dev; > > > >...
2018 Feb 12
3
[PATCH 2/5] drm: Allow determining if current task is output poll worker
...the comments herethat this should be called by DRM drivers in order to prevent racing with hotplug polling workers, so that new drivers in the future can avoid implementing this race condition in their driver. > +bool drm_kms_helper_is_poll_worker(void) > +{ > + struct work_struct *work = current_work(); > + > + return work && work->func == output_poll_execute; > +} > +EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); > + > /** > * drm_kms_helper_poll_disable - disable output polling > * @dev: drm_device > diff --git a/include/drm/drm_crtc_helper.h b/includ...
2018 Feb 14
1
[PATCH v2] drm: Allow determining if current task is output poll worker
...rein the latter waits for polling to finish + * upon calling drm_kms_helper_poll_disable(), while the former waits for + * runtime suspend to finish upon calling pm_runtime_get_sync() in a + * connector ->detect hook. + */ +bool drm_kms_helper_is_poll_worker(void) +{ + struct work_struct *work = current_work(); + + return work && work->func == output_poll_execute; +} +EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); + /** * drm_kms_helper_poll_disable - disable output polling * @dev: drm_device diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 76e237bd989b..6...
2018 Feb 11
19
[PATCH 0/5] Fix deadlock on runtime suspend in DRM drivers
Fix a deadlock on hybrid graphics laptops that's been present since 2013: DRM drivers poll connectors in 10 sec intervals. The poll worker is stopped on ->runtime_suspend with cancel_delayed_work_sync(). However the poll worker invokes the DRM drivers' ->detect callbacks, which call pm_runtime_get_sync(). If the poll worker starts after runtime suspend has begun,
2018 Jul 18
3
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...t; > static inline bool pm_runtime_status_suspending(struct device *dev) > > { > > return dev->power.runtime_status == RPM_SUSPENDING; > > } > > > > static inline bool is_pm_work(struct device *dev) > > { > > struct work_struct *work = current_work(); > > > > return work && work->func == dev->power.work; > > } > > > > Then adding this to nvkm_i2c_aux_acquire(): > > > > struct device *dev = pad->i2c->subdev.device->dev; > > > > if (!(is_pm_work...
2018 Jul 21
1
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
...is runtime suspending. If there are functions which are called from drm_dp_mst_link_probe_work() as well as from other contexts, and those other contexts need a runtime PM ref to be acquired, you need to acquire the runtime PM ref conditionally on not being drm_dp_mst_link_probe_work() (using the current_work() technique). Alternatively, move acquisition of the runtime PM ref further up in the call chain to those other contexts. > Anyway-that's why your explanation doesn't make sense: the deadlock is > happening because we're calling pm_runtime_get_sync(). If we were to > make th...
2018 Feb 11
0
[PATCH 2/5] drm: Allow determining if current task is output poll worker
...s_helper_is_poll_worker - is %current task an output poll worker? + * + * Determine if %current task is an output poll worker. This can be used + * to select distinct code paths for output polling versus other contexts. + */ +bool drm_kms_helper_is_poll_worker(void) +{ + struct work_struct *work = current_work(); + + return work && work->func == output_poll_execute; +} +EXPORT_SYMBOL(drm_kms_helper_is_poll_worker); + /** * drm_kms_helper_poll_disable - disable output polling * @dev: drm_device diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 76e237bd989b..6...
2018 Feb 12
0
[Intel-gfx] [PATCH 2/5] drm: Allow determining if current task is output poll worker
...be called by DRM drivers in order to prevent racing with hotplug > polling workers, so that new drivers in the future can avoid implementing this > race condition in their driver. > > > +bool drm_kms_helper_is_poll_worker(void) > > +{ > > + struct work_struct *work = current_work(); > > + > > + return work && work->func == output_poll_execute; What ensures that work is accessible? Does this need rcu_read_lock protection or more? -Chris
2018 Jul 17
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...ollowing to > include/linux/pm_runtime.h: > > static inline bool pm_runtime_status_suspending(struct device *dev) > { > return dev->power.runtime_status == RPM_SUSPENDING; > } > > static inline bool is_pm_work(struct device *dev) > { > struct work_struct *work = current_work(); > > return work && work->func == dev->power.work; > } > > Then adding this to nvkm_i2c_aux_acquire(): > > struct device *dev = pad->i2c->subdev.device->dev; > > if (!(is_pm_work(dev) && pm_runtime_status_suspending(dev))) { >...
2018 Jul 18
0
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
...> include/linux/pm_runtime.h: > > static inline bool pm_runtime_status_suspending(struct device *dev) > { > return dev->power.runtime_status == RPM_SUSPENDING; > } > > static inline bool is_pm_work(struct device *dev) > { > struct work_struct *work = current_work(); > > return work && work->func == dev->power.work; > } > > Then adding this to nvkm_i2c_aux_acquire(): > > struct device *dev = pad->i2c->subdev.device->dev; > > if (!(is_pm_work(dev) && pm_runtime_status_suspending...
2019 Dec 13
3
[PATCH net 0/2] vsock/virtio: fix null-pointer dereference and related precautions
This series mainly solves a possible null-pointer dereference in virtio_transport_recv_listen() introduced with the multi-transport support [PATCH 1]. PATCH 2 adds a WARN_ON check for the same potential issue and a returned error in the virtio_transport_send_pkt_info() function to avoid crashing the kernel. Stefano Garzarella (2): vsock/virtio: fix null-pointer dereference in
2020 May 08
0
[RFC v4 01/12] kthread: Add kthread_queue_flush_work()
...sed with >1 worker, see kthread_queue_work(). */ WARN_ON_ONCE(work->worker != worker); if (!list_empty(&work->node)) - kthread_insert_work(worker, &fwork.work, work->node.next); + kthread_insert_work(worker, &fwork->work, work->node.next); else if (worker->current_work == work) - kthread_insert_work(worker, &fwork.work, + kthread_insert_work(worker, &fwork->work, worker->work_list.next); else - noop = true; + queued = false; - raw_spin_unlock_irq(&worker->lock); + raw_spin_unlock_irqrestore(&worker->lock, flags); + ret...
2018 Jul 17
3
[PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
[cc += linux-pm] Hi Lyude, First of all, thanks a lot for looking into this. On Mon, Jul 16, 2018 at 07:59:25PM -0400, Lyude Paul wrote: > In order to fix all of the spots that need to have runtime PM get/puts() > added, we need to ensure that it's possible for us to call > pm_runtime_get/put() in any context, regardless of how deep, since > almost all of the spots that are
2018 Jul 19
3
[PATCH 1/2] drm/fb_helper: Add drm_fb_helper_output_poll_changed_with_rpm()
On Wed, Jul 18, 2018 at 04:56:39PM -0400, Lyude Paul wrote: > When DP MST hubs get confused, they can occasionally stop responding for > a good bit of time up until the point where the DRM driver manages to > do the right DPCD accesses to get it to start responding again. In a > worst case scenario however, this process can take upwards of 10+ > seconds. > > Currently we use
2020 May 08
16
[RFC v4 00/12] drm/nouveau: Introduce CRC support for gf119+
Nvidia released some documentation on how CRC support works on their GPUs, hooray! So: this patch series implements said CRC support in nouveau, along with adding some special debugfs interfaces for some relevant igt-gpu-tools tests (already on the ML). First - we add some new functionality to kthread_work in the kernel, and then use this to add a new feature to DRM that Ville Syrj?l? came up