diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 16:41:48 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-09-29 16:41:48 -0400 |
| commit | d31399f46e813f894c1a42afc8fee217f1d261b4 (patch) | |
| tree | 49d2dcab083f35bd1ab2c80d8952ad991d1e957c /kernel/gsp_sema_service.c | |
| parent | 1ad8556e8ed81ab91bf74ebc76681f350ca8bf6f (diff) | |
| download | open-iov-d31399f46e813f894c1a42afc8fee217f1d261b4.tar.gz open-iov-d31399f46e813f894c1a42afc8fee217f1d261b4.zip | |
sema-svc: wake the service thread on every injected pin
The injection queue was only drained at the top of the service loop, which
can be inside a multi-second pump/discovery pass; live runs showed the GR
counter pins landing ~1 s after the client mapped the page, i.e. after its
context-init deadline. Waking on enqueue drains the batch immediately.
Diffstat (limited to 'kernel/gsp_sema_service.c')
| -rw-r--r-- | kernel/gsp_sema_service.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index d476188..3c732e8 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -4870,6 +4870,15 @@ int gsp_sema_service_add_map(u64 gpu_va, u64 pa, u64 len, u32 ap) svc_map_add_q[svc_map_add_head % SVC_MAP_ADD_MAX].ap = ap; svc_map_add_head = next; spin_unlock_irqrestore(&svc_map_add_lock, flags); + + /* + * Drain now: the client's context-init deadline is a couple of + * seconds and the service loop may be in a long pump/discovery pass, + * so an injection that waits for the next loop iteration can land + * after the client already gave up. + */ + if (svc.task) + wake_up_process(svc.task); return 0; } |
