Skip to content
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

WIP: K2IS support #22

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

WIP: K2IS support #22

wants to merge 41 commits into from

Conversation

sk1p
Copy link
Member

@sk1p sk1p commented Apr 18, 2023

Opened to keep track of TODOs.

TODO

  • Update for new ipc-test version
    • Probably: split K2Frame into a thread-local variant with a SlotForWriting (K2FrameForWriting?), and an immutable variant to pass around for further processing
  • Include warm-up at startup to harden against initial jitter
    • This might also be needed on the "upper layers" - maybe we can run a UDF on a small acquisition to warm up the Python parts
  • Build non-CPU-native version by default for wheels
  • Performance: add more multiversion usage for especially hot functions
  • Performance: use LTO somehow? Needs good "integration benchmark"
  • Can we disable features from nightly, port to stable rust toolchain? Otherwise, need to fix pre-commit hooks, CI etc.
  • Remove unused dependencies, clean up code where necessary etc.
  • Add tools
    • parallel-udp-replay
    • Network setup scripts, monitoring etc.
  • Documentation
    • Add docs on how to build with -Ctarget-cpu=native for optimal performance
    • Setup documentation, possibly including switch configuration?
    • How to perform a PCAP capture using wireshark that can be replayed with parallel-udp-replay

sk1p added 25 commits October 1, 2024 18:23
- timestamp_recorder: set local_addr depending on sector
- ipc_test: pre-fault the whole shm area
- warmup: increase number of blocks sent through
- add a "circuit breaker" if the `assembly_channel` fills up too fast
- `k2is_live.py`: allow setting a filename pattern and controlling the
  synchronization mode
Still slightly broken, but useful still for starting to receive multicast
traffic (for example for capturing), or for testing the receive code in
isolation.
* Split frame module into base, is, and summit modules
* main: allocate shm with correct slot size
* Fix `decode_u16_vec` to correctly take header into account
* Fully implement `K2Frame` trait for `K2SummitFrame`
* Slightly improve error handling; shut down assembly threads when one
  of the workers has died
* Lots of clippy fixes
Meaning, work towards multiple acquisitions after another with minimal
delay inbetween.
Otherwise, the recv on the second channel will, in the worst case, be
limited to the timeout of the first recv.

Also work on fixing the missing first frame issue.
If a frame is 'dropped multiple times', that means the acquisition index
is counted up too often, which can then result in the re-ordering buffer
being non-empty at the end of an acquisition, which is not expected.
It's a lot faster to just use `getattr`/`call0` to call Python functions
instead of compiling a Python module each time the function is called.
Otherwise, there is a high chance of having multiple dropped frames at
the beginning of an acquisition, because receiving from multicast
sockets does not initialize instantaneously.
Extract some configuration into `AcquisitionRuntimeConfig`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant