Commit Graph
9 Commits
Author SHA1 Message Date
Benjamin Cabé cd2b157682 perf(uORB): skip subscription lookups until a device node is added (#29249)
While a topic has no device node, every Subscription::update(), copy(),
updated() and advertised() repeats the device node lookup and fails
again. Polling modules touch many optional topics on every loop: in a
SITL flight about 8% of all instructions, and about a quarter of each
MAVLink thread, were such failed lookups.

Device nodes are never removed, so a lookup that failed cannot succeed
before a node is added. Count the nodes added in DeviceMaster and only
retry the lookup once that count has changed. Protected builds, where
user space has no cheap access to it, keep retrying every time.

Assisted-by: Claude:claude-opus-5-5

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-10-24 07:06:39 -08:00
Lourens Naude 5abef6d065 perf(uORB): match nodes by ORB_ID instead of strcmp
Assisted-by: Claude:claude-fable-5-1
2026-10-22 08:26:26 +02:00
Lourens Naude 537b82d380 perf(uORB): check the exists bitset before allocating in advertise()
Assisted-by: Claude:claude-fable-5-1
2026-10-22 08:26:26 +02:00
hskrieg 64c21ad428 uorb: allow for more than 255 uORB messages
Increased size for ORB_ID from uint8_t to uint16_t

Created a type: orb_id_size_t = uint16_t.
There are still a couple of places where the size
of the ORB_ID is assumed to be less than 16-bits.
The places that I have found are commented regarding
this and can be found with a search on orb_id_size_t.
2023-08-08 10:59:34 +02:00
Zachary Lowell 52b16d062c uORB Remote Manager Update (#20623) 2022-11-17 13:51:01 -08:00
Jukka Laitinen ce6147f570 uORB: Remove transfer of memory allocation ownership to CDev
- Allocate and free the node name in uORBDeviceNode.
- Add protected build support by de-allocating the name with kmm_free, when
  running in kernel side. strdup allocates from the kernel heap in NuttX kernel
  space.
- Remove the CDev::unregister_driver_and_memory(), it is no longer used

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-12-13 22:52:36 -05:00
Jukka Laitinen 3f884c5d24 Inline deviceNodeExists and getDeviceNode in uORB DeviceMaster
This gives a small performance improvement

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Daniel Agar 9a3fa6199b uorb top report total publication rate 2021-09-26 12:29:11 -04:00
Daniel Agar ab0d0fd0be uORB move to PX4 platform layer 2021-02-17 11:25:56 -05:00