rtio: Enable submit/consume semaphores by default

The default behavior for thread pending of completions should use
semaphores rather than yield/wait looping when multithreading is
available.

Disable by default only when multithreading isn't available.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2024-07-31 10:51:10 -05:00 committed by Carles Cufí
parent f4a7d24858
commit 71bf36387c
1 changed files with 8 additions and 0 deletions

View File

@ -8,14 +8,20 @@ if RTIO
config RTIO_SUBMIT_SEM config RTIO_SUBMIT_SEM
bool "Use a semaphore when waiting for completions in rtio_submit" bool "Use a semaphore when waiting for completions in rtio_submit"
default n if !MULTITHREADING
default y
help help
When calling rtio_submit a semaphore is available to sleep the calling When calling rtio_submit a semaphore is available to sleep the calling
thread for each completion queue event until the wait count is met. This thread for each completion queue event until the wait count is met. This
adds a small RAM overhead for a single semaphore. By default wait_for will adds a small RAM overhead for a single semaphore. By default wait_for will
use polling on the completion queue with a k_yield() in between iterations. use polling on the completion queue with a k_yield() in between iterations.
Enabled by default unless !MULTITHREADING
config RTIO_CONSUME_SEM config RTIO_CONSUME_SEM
bool "Use a semaphore when waiting for completions in rtio_cqe_consume_block" bool "Use a semaphore when waiting for completions in rtio_cqe_consume_block"
default n if !MULTITHREADING
default y
help help
When calling rtio_cqe_consume_block a semaphore is available to sleep the When calling rtio_cqe_consume_block a semaphore is available to sleep the
calling thread for each completion queue event until the wait count is met. calling thread for each completion queue event until the wait count is met.
@ -23,6 +29,8 @@ config RTIO_CONSUME_SEM
will use polling on the completion queue with a k_yield() in between will use polling on the completion queue with a k_yield() in between
iterations. iterations.
Enabled by default unless !MULTIHREADING
config RTIO_SYS_MEM_BLOCKS config RTIO_SYS_MEM_BLOCKS
bool "Include system memory blocks as an optional backing read memory pool" bool "Include system memory blocks as an optional backing read memory pool"
select SYS_MEM_BLOCKS select SYS_MEM_BLOCKS