Displaying 4 results from an estimated 4 matches for "kthread_queue_flush_work".
2020 May 08
0
[RFC v4 01/12] kthread: Add kthread_queue_flush_work()
...to finish flushing on a work early if it's been
cancelled at any point (e.g. before or after it's actually been queued
on the kthread_worker).
So, let's make all of these things possible by exposing struct
kthread_flush_work, and then splitting kthread_flush_work() into two
functions: kthread_queue_flush_work(); which handles possibly queuing up
the kthread_flush_work on the work's respective kthread_worker, and
kthread_flush_work(); which performs a simple synchronous flush just
like before. We also add a DEFINE_KTHREAD_FLUSH_WORK() macro, which
simply initializes a kthread_flush_work struct inline...
2020 May 11
1
[RFC v4 01/12] kthread: Add kthread_queue_flush_work()
Hello,
On Fri, May 08, 2020 at 04:46:51PM -0400, Lyude Paul wrote:
> +bool kthread_queue_flush_work(struct kthread_work *work,
> + struct kthread_flush_work *fwork);
> +void __kthread_flush_work_fn(struct kthread_work *work);
As an exposed interface, this doesn't seem great. What the user wants to say
is "wait for the current instance of this guy" and the interface is...
2020 May 08
0
[RFC v4 04/12] drm/vblank: Add vblank works
...+ struct kthread_flush_work *fwork, *tmp;
+ bool busy, reinit = false;
+
+ busy = kthread_queue_work(work->vblank->worker, &work->base);
+ list_for_each_entry_safe(fwork, tmp, &work->flush_work, work.node) {
+ if (busy) {
+ list_del_init(&fwork->work.node);
+ busy = kthread_queue_flush_work(&work->base, fwork);
+ if (!busy)
+ complete(&fwork->done);
+ } else {
+ complete(&fwork->done);
+ reinit = true;
+ }
+ }
+
+ if (reinit)
+ INIT_LIST_HEAD(&work->flush_work);
+}
+
+static void drm_handle_vblank_works(struct drm_vblank_crtc *vblank)
+{
+ struc...
2020 May 08
16
[RFC v4 00/12] drm/nouveau: Introduce CRC support for gf119+
...d cancelling. I think this interface looks a lot more acceptable
then what I was previously trying.
* Apply some changes requested by danvet
Major changes since v2:
* Use kthread_worker instead of kthreadd for vblank workers
* Don't check debugfs return values
Lyude Paul (12):
kthread: Add kthread_queue_flush_work()
kthread: Add kthread_(un)block_work_queuing() and
kthread_work_queuable()
drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
drm/vblank: Add vblank works
drm/nouveau/kms/nv50-: Unroll error cleanup in nv50_head_create()
drm/nouveau/kms/nv140-: Don't modify depth i...