mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
arch: xtensa: Optimize cache management for pinned threads
When building with CONFIG_SCHED_CPU_MASK_PIN_ONLY we can assume that a thread will always be executed in a same CPU and consequently skip the cache invalidation. Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
committed by
Anas Nashif
parent
551038e748
commit
f5a0d4cd26
@@ -84,6 +84,14 @@ static ALWAYS_INLINE void arch_cohere_stacks(struct k_thread *old_thread,
|
||||
: "=r"(a0save));
|
||||
}
|
||||
|
||||
/* The following option ensures that a living thread will never
|
||||
* be executed in a different CPU so we can safely return without
|
||||
* invalidate and/or flush threads cache.
|
||||
*/
|
||||
if (IS_ENABLED(CONFIG_SCHED_CPU_MASK_PIN_ONLY)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* The "live" area (the region between the switch handle,
|
||||
* which is the stack pointer, and the top of the stack
|
||||
* memory) of the inbound stack needs to be invalidated if we
|
||||
|
||||
Reference in New Issue
Block a user