Message ID | 20250225150614.20195-7-mzamazal@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Milan, Thank you for the patch. On Tue, Feb 25, 2025 at 04:06:12PM +0100, Milan Zamazal wrote: > When stopping the proxy thread, all messages of InvokeMessage type > posted to the pipeline handler thread are dispatched, to ensure that all > signals emitted from the proxy thread and queued for delivery to the > proxy are delivered synchronously. This unnecessarily delivers queued > signals for other objects in the pipeline handler thread, possibly > delaying processing of higher priority events. > > Improve the implementation by limiting synchronous delivery to messages > posted for the proxy. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > .../ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > index b5797b14..25476990 100644 > --- a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > +++ b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > @@ -34,7 +34,7 @@ > thread_.exit(); > thread_.wait(); > > - Thread::current()->dispatchMessages(Message::Type::InvokeMessage); > + Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this); > > state_ = ProxyStopped; > {%- endmacro -%}
On Tue, Feb 25, 2025 at 04:06:12PM +0100, Milan Zamazal wrote: > When stopping the proxy thread, all messages of InvokeMessage type > posted to the pipeline handler thread are dispatched, to ensure that all > signals emitted from the proxy thread and queued for delivery to the > proxy are delivered synchronously. This unnecessarily delivers queued > signals for other objects in the pipeline handler thread, possibly > delaying processing of higher priority events. > > Improve the implementation by limiting synchronous delivery to messages > posted for the proxy. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > .../ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > index b5797b14..25476990 100644 > --- a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > +++ b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > @@ -34,7 +34,7 @@ > thread_.exit(); > thread_.wait(); > > - Thread::current()->dispatchMessages(Message::Type::InvokeMessage); > + Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this); > > state_ = ProxyStopped; > {%- endmacro -%} > -- > 2.48.1 >
Quoting Milan Zamazal (2025-02-25 15:06:12) > When stopping the proxy thread, all messages of InvokeMessage type > posted to the pipeline handler thread are dispatched, to ensure that all > signals emitted from the proxy thread and queued for delivery to the > proxy are delivered synchronously. This unnecessarily delivers queued > signals for other objects in the pipeline handler thread, possibly > delaying processing of higher priority events. > > Improve the implementation by limiting synchronous delivery to messages > posted for the proxy. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > .../ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > index b5797b14..25476990 100644 > --- a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > +++ b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl > @@ -34,7 +34,7 @@ > thread_.exit(); > thread_.wait(); > > - Thread::current()->dispatchMessages(Message::Type::InvokeMessage); > + Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this); > > state_ = ProxyStopped; > {%- endmacro -%} > -- > 2.48.1 >
diff --git a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl index b5797b14..25476990 100644 --- a/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl +++ b/utils/codegen/ipc/generators/libcamera_templates/proxy_functions.tmpl @@ -34,7 +34,7 @@ thread_.exit(); thread_.wait(); - Thread::current()->dispatchMessages(Message::Type::InvokeMessage); + Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this); state_ = ProxyStopped; {%- endmacro -%}
When stopping the proxy thread, all messages of InvokeMessage type posted to the pipeline handler thread are dispatched, to ensure that all signals emitted from the proxy thread and queued for delivery to the proxy are delivered synchronously. This unnecessarily delivers queued signals for other objects in the pipeline handler thread, possibly delaying processing of higher priority events. Improve the implementation by limiting synchronous delivery to messages posted for the proxy. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> --- .../ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)