summaryrefslogtreecommitdiff
path: root/nuttx/libc/Kconfig
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-10-11 15:50:22 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-10-11 15:50:22 -0600
commit063645013a5e7632e2941afd5b1b5ed30d76ce43 (patch)
treea8b2d57f99e79b29b4998f3b254dbcbe3021ffd1 /nuttx/libc/Kconfig
parentcf633d2c637428d74313388ac4bbabe77b18b84f (diff)
downloadpx4-nuttx-063645013a5e7632e2941afd5b1b5ed30d76ce43.tar.gz
px4-nuttx-063645013a5e7632e2941afd5b1b5ed30d76ce43.tar.bz2
px4-nuttx-063645013a5e7632e2941afd5b1b5ed30d76ce43.zip
Decouple the user-space work queue from the kernel space work queues
Diffstat (limited to 'nuttx/libc/Kconfig')
-rw-r--r--nuttx/libc/Kconfig166
1 files changed, 3 insertions, 163 deletions
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig
index 028c70cfa..8226793f7 100644
--- a/nuttx/libc/Kconfig
+++ b/nuttx/libc/Kconfig
@@ -393,174 +393,15 @@ endif # ARCH_OPTIMIZED_FUNCTIONS
comment "Non-standard Library Support"
-config SCHED_WORKQUEUE
- bool "Enable worker thread"
- default n
- depends on !DISABLE_SIGNALS
- ---help---
- Create a dedicated "worker" thread to handle delayed processing from interrupt
- handlers. This feature is required for some drivers but, if there are no
- complaints, can be safely disabled. The worker thread also performs
- garbage collection -- completing any delayed memory deallocations from
- interrupt handlers. If the worker thread is disabled, then that clean up will
- be performed by the IDLE thread instead (which runs at the lowest of priority
- and may not be appropriate if memory reclamation is of high priority).
-
-if SCHED_WORKQUEUE
-
-config SCHED_HPWORK
- bool "High priority (kernel) worker thread"
- default y
- ---help---
- If SCHED_WORKQUEUE is defined, then a single, high priority work
- queue is created by default. This high priority worker thread is
- intended to serve as the "bottom half" for driver interrupt
- handling.
-
-if SCHED_HPWORK
-
-config SCHED_WORKPRIORITY
- int "High priority worker thread priority"
- default 224
- ---help---
- The execution priority of the higher priority worker thread.
-
- The higher priority worker thread is intended to serve as the
- "bottom" half for device drivers. As a consequence it must run at
- a very high, fixed priority. Typically, it should be the highest
- priority thread in your system. Default: 192
-
- For lower priority, application oriented worker thread support,
- please consider enabling the lower priority work queue. The lower
- priority work queue runs at a lower priority, of course, but has
- the added advantage that it supports "priority inheritance" (if
- PRIORITY_INHERITANCE is also selected): The priority of the lower
- priority worker thread can then be adjusted to match the highest
- priority client.
-
-config SCHED_WORKPERIOD
- int "High priority worker thread period"
- default 100000 if SCHED_LPWORK
- default 50000 if !SCHED_LPWORK
- ---help---
- How often the worker thread checks for work in units of microseconds.
- Default: If the high priority worker thread is performing garbage
- collection, then the default is 50*1000 (50 MS). Otherwise, if the
- lower priority worker thread is performing garbage collection, the
- default is 100*1000.
-
-config SCHED_WORKSTACKSIZE
- int "High priority worker thread stack size"
- default 2048
- ---help---
- The stack size allocated for the worker thread. Default: 2K.
-
-endif # SCHED_HPWORK
-
-config SCHED_LPWORK
- bool "Low priority (kernel) worker thread"
- default n
- ---help---
- If SCHED_WORKQUEUE is defined, then a single work queue is created by
- default. If SCHED_LPWORK is also defined then an additional, lower-
- priority work queue will also be created. This lower priority work
- queue is better suited for more extended, application oriented
- processing (such as file system clean-up operations or asynchronous
- I/O)
-
-if SCHED_LPWORK
-
-config SCHED_LPNTHREADS
- int "Number of low-priority worker threads"
- default 1 if !FS_AIO
- default 4 if FS_AIO
- ---help---
- This options selectes multiple, low-priority threads. This is
- essentially a "thread pool" that provides multi-threaded service
- of the low-priority work thread. This breaks the serialization
- of the "queue" (hence, it is no longer a queue at all).
-
- This options is required to support, for example, I/O operations
- that stall waiting for input. If there is only a single thread,
- then the entire low-priority queue processing stalls in such cases.
- Such behvior must be support for asynchronous I/O, AIO (for example).
-
-config SCHED_LPWORKPRIORITY
- int "Low priority worker thread priority"
- default 50
- ---help---
- The minimum execution priority of the lower priority worker thread.
-
- The lower priority worker thread is intended support application-
- oriented functions. The lower priority work queue runs at a lower
- priority, of course, but has the added advantage that it supports
- "priority inheritance" (if PRIORITY_INHERITANCE is also selected):
- The priority of the lower priority worker thread can then be
- adjusted to match the highest priority client. Default: 50
-
- NOTE: This priority inheritance feature is not automatic. The
- lower priority worker thread will always a fixed priority unless
- you implement logic that calls lpwork_boostpriority() to raise the
- priority of the lower priority worker thread (typically called
- before scheduling the work) and then call the matching
- lpwork_restorepriority() when the work is completed (typically
- called within the work handler at the completion of the work).
- Currently, only the NuttX asynchronous I/O logic uses this dynamic
- prioritization feature.
-
- The higher priority worker thread, on the other hand, is intended
- to serve as the "bottom" half for device drivers. As a consequence
- it must run at a very high, fixed priority. Typically, it should
- be the highest priority thread in your system.
-
-config SCHED_LPWORKPRIOMAX
- int "Low priority worker thread maximum priority"
- default 176
- depends on PRIORITY_INHERITANCE
- ---help---
- The maximum execution priority of the lower priority worker thread.
-
- The lower priority worker thread is intended support application-
- oriented functions. The lower priority work queue runs at a lower
- priority, of course, but has the added advantage that it supports
- "priority inheritance" (if PRIORITY_INHERITANCE is also selected):
- The priority of the lower priority worker thread can then be
- adjusted to match the highest priority client.
-
- The higher priority worker thread, on the other hand, is intended
- to serve as the "bottom" half for device drivers. As a consequence
- it must run at a very high, fixed priority. Typically, it should
- be the highest priority thread in your system.
-
- This function provides an upper limit on the priority of the lower
- priority worker thread. This would be necessary, for example, if
- the higher priority worker thread were to defer work to the lower
- priority thread. Clearly, in such a case, you would want to limit
- the maximum priority of the lower priority work thread. Default:
- 176
-
-config SCHED_LPWORKPERIOD
- int "Low priority worker thread period"
- default 50000
- ---help---
- How often the lower priority worker thread checks for work in units
- of microseconds. Default: 50*1000 (50 MS).
-
-config SCHED_LPWORKSTACKSIZE
- int "Low priority worker thread stack size"
- default 2048
- ---help---
- The stack size allocated for the lower priority worker thread. Default: 2K.
-
-endif # SCHED_LPWORK
-
if BUILD_PROTECTED || BUILD_KERNEL
config SCHED_USRWORK
bool "User mode worker thread"
default n
+ depends on !DISABLE_SIGNALS
---help---
- User space work queues can also be made available for deferred processing in the NuttX kernel build.
+ User space work queues can also be made available for deferred
+ processing in the NuttX kernel build.
if SCHED_USRWORK
@@ -585,7 +426,6 @@ config SCHED_USRWORKSTACKSIZE
endif # SCHED_USRWORK
endif # BUILD_PROTECTED
-endif # SCHED_WORKQUEUE
config LIB_KBDCODEC
bool "Keyboard CODEC"