zephyr/samples/subsys
Tom Burdick 3998f9f898 rtio: Shareable lock-free iodevs
By using an mpsc queue for each iodev, the iodev itself is shareable across
contexts. Since its lock free, submits may occur even from an ISR context.

Rather than a fixed size queue, and with it the possibility of running
out of pre-allocated spots, each iodev now holds a wait-free mpsc
queue head.

This changes the parameter of iodev submit to be a struct containing 4
pointers for the rtio context, the submission queue entry, and the mpsc
node for the iodevs submission queue.

This solves the problem involving busy iodevs working with real
devices. For example a busy SPI bus driver could enqueue, without locking,
a request to start once the current request is done.

The queue entries are expected to be owned and allocated by the
executor rather than the iodev. This helps simplify potential
tuning knobs to one place, the RTIO context and its executor an
application directly uses.

As the test case shows iodevs can operate effectively lock free
with the mpsc queue and a single atomic denoting the current task.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-03-03 09:18:09 +01:00
..
canbus samples: canbus: isotp: add option for running in loopback mode 2023-02-06 10:03:31 +01:00
console includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
debug samples: add debug monitor sample 2022-12-28 12:00:46 +01:00
display samples: display: cfb_custom_font: turn off display_blanking at boot 2023-02-24 09:26:30 +01:00
edac tests/samples: use integration_plaforms in more tests/samples 2022-11-29 16:03:23 +01:00
fs samples: fs: enable littlefs sample for LPC55S69 2023-03-02 10:57:31 +01:00
ipc samples: ipc: Fix incorrect license 2023-02-06 22:36:05 +09:00
logging treewide: Use CONFIG_CPP instead of CONFIG_CPLUSPLUS 2023-01-13 17:42:55 -05:00
lorawan samples: subsys: lorawan: class_a: add clock sync option 2023-01-23 10:05:49 +00:00
mgmt samples: mgmt: mcumgr: smp_svr: Add missing base64 selects 2023-02-20 15:58:27 +01:00
modbus samples: Explicitly disable boot USB device support init at boot 2023-01-10 12:21:10 +01:00
nvs yamllint: fix all yamllint line-length errors 2023-01-04 01:16:45 +09:00
pm tests/samples: use integration_plaforms in more tests/samples 2022-11-29 16:03:23 +01:00
portability samples/philosophers: Fix expected output in test configuration 2023-02-24 12:34:26 +01:00
rtio/sensor_batch_processing rtio: Shareable lock-free iodevs 2023-03-03 09:18:09 +01:00
settings yamllint: fix all yamllint line-length errors 2023-01-04 01:16:45 +09:00
shell samples: Explicitly disable boot USB device support init at boot 2023-01-10 12:21:10 +01:00
task_wdt samples: subsys: task_wdt: skip for s32z270dc2 2023-02-09 11:14:24 +01:00
testsuite pytest: Fix typo in comment in pytest suite 2023-02-19 20:41:34 -05:00
tracing samples: Explicitly disable boot USB device support init at boot 2023-01-10 12:21:10 +01:00
usb samples: usb: mass: Increase main stack size 2023-03-02 15:05:58 +01:00
usb_c samples: usb-c: sink: Enable Dead Battery functionality on Port1 2023-02-06 10:03:13 +01:00
video tests/samples: use integration_plaforms in more tests/samples 2022-11-29 16:03:23 +01:00
zbus samples: zbus: runtime_obs_registration: fix running on QEMU 2023-02-20 10:53:25 +01:00
subsys.rst