[rtems commit] score: Optimize per-processor data placement
Sebastian Huber
sebh at rtems.org
Sat Feb 1 14:56:19 UTC 2020
Module: rtems
Branch: master
Commit: 9e4f21b927e8a81df8044806e88128388911e123
Changeset: http://git.rtems.org/rtems/commit/?id=9e4f21b927e8a81df8044806e88128388911e123
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Sat Feb 1 15:42:27 2020 +0100
score: Optimize per-processor data placement
Only align per-processor data in SMP configurations.
---
cpukit/score/src/wkspace.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c
index 0834438..d363b8d 100644
--- a/cpukit/score/src/wkspace.c
+++ b/cpukit/score/src/wkspace.c
@@ -37,7 +37,14 @@
RTEMS_LINKER_RWSET(
_Per_CPU_Data,
- RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) char
+#if defined(RTEMS_SMP)
+ /*
+ * In SMP configurations, prevent false cache line sharing of per-processor
+ * data with a proper alignment.
+ */
+ RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
+#endif
+ char
);
Heap_Control _Workspace_Area;
More information about the vc
mailing list