kernel: remove unused offload workqueue option

Those are used only in tests, so remove them from kernel Kconfig and set
them in the tests that use them directly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-03-26 18:05:55 -04:00
parent 51125b2890
commit b90fafd6a0
10 changed files with 19 additions and 26 deletions

View file

@ -49,9 +49,6 @@ config TEST_EXTRA_STACKSIZE
config SYSTEM_WORKQUEUE_STACK_SIZE config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 default 4096
config OFFLOAD_WORKQUEUE_STACK_SIZE
default 4096
config CMSIS_THREAD_MAX_STACK_SIZE config CMSIS_THREAD_MAX_STACK_SIZE
default 4096 default 4096

View file

@ -20,9 +20,6 @@ config TEST_EXTRA_STACKSIZE
config SYSTEM_WORKQUEUE_STACK_SIZE config SYSTEM_WORKQUEUE_STACK_SIZE
default 8192 default 8192
config OFFLOAD_WORKQUEUE_STACK_SIZE
default 8192
config EXCEPTION_STACK_SIZE config EXCEPTION_STACK_SIZE
int "Size of the exception stack(s)" int "Size of the exception stack(s)"
default 2048 default 2048

View file

@ -34,5 +34,4 @@ CONFIG_IDLE_STACK_SIZE=8192
CONFIG_PRIVILEGED_STACK_SIZE=8192 CONFIG_PRIVILEGED_STACK_SIZE=8192
CONFIG_TEST_EXTRA_STACKSIZE=4096 CONFIG_TEST_EXTRA_STACKSIZE=4096
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE=4096
CONFIG_ISR_STACK_SIZE=4096 CONFIG_ISR_STACK_SIZE=4096

View file

@ -23,9 +23,6 @@ them for your application:
:option:`CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE` :option:`CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE`
Set to 1024 by default Set to 1024 by default
:option:`CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE`
Set to 1024 by default
:option:`CONFIG_PRIVILEGED_STACK_SIZE` :option:`CONFIG_PRIVILEGED_STACK_SIZE`
Set to 1024 by default, depends on userspace feature. Set to 1024 by default, depends on userspace feature.

View file

@ -374,15 +374,6 @@ config SYSTEM_WORKQUEUE_PRIORITY
priority. This means that any work handler, once started, won't priority. This means that any work handler, once started, won't
be preempted by any other thread until finished. be preempted by any other thread until finished.
config OFFLOAD_WORKQUEUE_STACK_SIZE
int "Workqueue stack size for thread offload requests"
default 4096 if COVERAGE
default 1024
config OFFLOAD_WORKQUEUE_PRIORITY
int "Offload requests workqueue priority"
default -1
endmenu endmenu
menu "Atomic Operations" menu "Atomic Operations"

View file

@ -6,7 +6,6 @@ CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=65535
CONFIG_MAIN_STACK_SIZE=65535 CONFIG_MAIN_STACK_SIZE=65535
CONFIG_IDLE_STACK_SIZE=65535 CONFIG_IDLE_STACK_SIZE=65535
CONFIG_ISR_STACK_SIZE=65535 CONFIG_ISR_STACK_SIZE=65535
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE=65535
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535
CONFIG_NET_CONNECTION_MANAGER_STACK_SIZE=65535 CONFIG_NET_CONNECTION_MANAGER_STACK_SIZE=65535
CONFIG_SHELL_STACK_SIZE=65535 CONFIG_SHELL_STACK_SIZE=65535

View file

@ -6,7 +6,6 @@ CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=65535
CONFIG_MAIN_STACK_SIZE=65535 CONFIG_MAIN_STACK_SIZE=65535
CONFIG_IDLE_STACK_SIZE=65535 CONFIG_IDLE_STACK_SIZE=65535
CONFIG_ISR_STACK_SIZE=65535 CONFIG_ISR_STACK_SIZE=65535
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE=65535
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535
CONFIG_NET_CONNECTION_MANAGER_STACK_SIZE=65535 CONFIG_NET_CONNECTION_MANAGER_STACK_SIZE=65535
CONFIG_SHELL_STACK_SIZE=65535 CONFIG_SHELL_STACK_SIZE=65535

View file

@ -6,5 +6,4 @@ CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=65535
CONFIG_MAIN_STACK_SIZE=65535 CONFIG_MAIN_STACK_SIZE=65535
CONFIG_IDLE_STACK_SIZE=65535 CONFIG_IDLE_STACK_SIZE=65535
CONFIG_ISR_STACK_SIZE=65535 CONFIG_ISR_STACK_SIZE=65535
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE=65535
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535 CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=65535

View file

@ -35,12 +35,20 @@
#define NUM_MILLISECONDS 5000 #define NUM_MILLISECONDS 5000
#define TEST_TIMEOUT 20000 #define TEST_TIMEOUT 20000
#ifdef CONFIG_COVERAGE
#define OFFLOAD_WORKQUEUE_STACK_SIZE 4096
#else
#define OFFLOAD_WORKQUEUE_STACK_SIZE 1024
#endif
#define OFFLOAD_WORKQUEUE_PRIORITY (-1)
static u32_t critical_var; static u32_t critical_var;
static u32_t alt_thread_iterations; static u32_t alt_thread_iterations;
static struct k_work_q offload_work_q; static struct k_work_q offload_work_q;
static K_THREAD_STACK_DEFINE(offload_work_q_stack, static K_THREAD_STACK_DEFINE(offload_work_q_stack,
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE); OFFLOAD_WORKQUEUE_STACK_SIZE);
#define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACKSIZE) #define STACK_SIZE (1024 + CONFIG_TEST_EXTRA_STACKSIZE)
@ -203,7 +211,7 @@ static void init_objects(void)
k_work_q_start(&offload_work_q, k_work_q_start(&offload_work_q,
offload_work_q_stack, offload_work_q_stack,
K_THREAD_STACK_SIZEOF(offload_work_q_stack), K_THREAD_STACK_SIZEOF(offload_work_q_stack),
CONFIG_OFFLOAD_WORKQUEUE_PRIORITY); OFFLOAD_WORKQUEUE_PRIORITY);
} }
static void start_threads(void) static void start_threads(void)

View file

@ -30,9 +30,16 @@
#define NON_NULL_PTR ((void *)0x12345678) #define NON_NULL_PTR ((void *)0x12345678)
#ifdef CONFIG_COVERAGE
#define OFFLOAD_WORKQUEUE_STACK_SIZE 4096
#else
#define OFFLOAD_WORKQUEUE_STACK_SIZE 1024
#endif
#define OFFLOAD_WORKQUEUE_PRIORITY (-1)
static struct k_work_q offload_work_q; static struct k_work_q offload_work_q;
static K_THREAD_STACK_DEFINE(offload_work_q_stack, static K_THREAD_STACK_DEFINE(offload_work_q_stack,
CONFIG_OFFLOAD_WORKQUEUE_STACK_SIZE); OFFLOAD_WORKQUEUE_STACK_SIZE);
struct fifo_data { struct fifo_data {
intptr_t reserved; intptr_t reserved;
@ -244,7 +251,7 @@ void task_high(void)
k_work_q_start(&offload_work_q, k_work_q_start(&offload_work_q,
offload_work_q_stack, offload_work_q_stack,
K_THREAD_STACK_SIZEOF(offload_work_q_stack), K_THREAD_STACK_SIZEOF(offload_work_q_stack),
CONFIG_OFFLOAD_WORKQUEUE_PRIORITY); OFFLOAD_WORKQUEUE_PRIORITY);
counter = SEM_TEST_START; counter = SEM_TEST_START;