New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hw: review signal semantics in comparison to the generic implementation #1781
Comments
* Use Kernel::kill_signal/ack_signal only for demarshalling from UTCB * Use Signal_context::_destroy_lock and Kernel::kill_signal for destruction sync * Use Signal_receiver::block_for_signal/pending_signal to implement Signal_receiver::wait_for_signal * Move more stuff from specific signal/signal.cc to generic signal/common.cc * Use Signal_receiver::_contexts to find pending signals * Remove deprecated syscall Kernel::signal_pending Ref genodelabs#1738 Ref genodelabs#1781
There are some more open issues in the signal framework like the redundancy of Signal_context::_pending and Signal_context::_curr_signal (may both be raplaced by Signal_context::_num) or that Signal_context::submit/Signal_receiver::local_submit shouldn't be public but I would vote for opening separate issues for them. |
* Use Kernel::kill_signal/ack_signal only for demarshalling from UTCB * Use Signal_context::_destroy_lock and Kernel::kill_signal for destruction sync * Use Signal_receiver::block_for_signal/pending_signal to implement Signal_receiver::wait_for_signal * Move more stuff from specific signal/signal.cc to generic signal/common.cc * Use Signal_receiver::_contexts to find pending signals * Remove deprecated syscall Kernel::signal_pending Ref #1738 Ref #1781
@m-stein should we close this issue or remove the fixed label? |
I forgot to add a "Fixed". Thanks. |
With the changes in #1738 esp. e32c19b, we revealed a gap between the generic signal-implementation semantics and the interpretation in base-hw. The generic implementation ensures correct reference counting in
Signal_context
according to the life time ofSignal
objects to support safe destruction of contexts. In base-hw, theSignal
life time also triggersKernel::ack_signal()
if the last reference to the linked context is dropped. Unfortunately, the genericSignal_context
object stores the current pending signal as a member of typeSignal::Data
which is just a plain data object not connected to the reference counting. In base-hw, we now have the challenge to demarshal the occuring signal from the UTCB inSignal_receiver::block_for_signal()
, store it inSignal_context::_curr_signal
, and only acknowledge at the kernel after is was retrieved from_curr_signal
inSignal_receiver::pending_signal()
.From my investigation, the current issues with
run/nic_loopback
andrun/blk_cache
(at least) on staging originate from the described gap. @m-stein please add any information a missed from our offline discussion yesterday.The text was updated successfully, but these errors were encountered: