Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kernel-debug-log] Kernel debug log #25

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Conversation

axel-h
Copy link
Owner

@axel-h axel-h commented Nov 26, 2021

No description provided.

@axel-h axel-h force-pushed the kernel-debug-log branch 27 times, most recently from a2648f8 to 4b5ff7c Compare December 3, 2021 13:05
@axel-h axel-h force-pushed the kernel-debug-log branch 3 times, most recently from 12351e0 to 6a4f7c7 Compare December 5, 2021 20:10
@axel-h axel-h force-pushed the kernel-debug-log branch 2 times, most recently from eb07ffc to e1fda4e Compare April 9, 2024 18:59
@axel-h axel-h force-pushed the kernel-debug-log branch 2 times, most recently from 835296a to 39e08b1 Compare June 28, 2024 14:10
Do not perform cache flushing in clearMemory. Instead flush the cache
only for those object types where it is necessary, and only when the
object is retyped, not when the untyped cap is reset.

This reduces overall need for flushing and delays it to the point of
use. This should speed up boot time significantly, but may impact WCET,
because the largest flush is now the largest page size (e.g. 24) instead
of CONFIG_RESET_CHUNK_BITS (8). The user could already request a flush
of the largest page size before, though, so it this may not actually
impact WCET. Remains to be investigated.

Why this is safe:

- Flushing is only necessary for objects that are seen by other parts of
  the system, not for kernel-internal object. These objects are
  non-device frames (including IOMMU pages) and page tables. All other
  objects are only read/written by the kernel. Frames need to be flushed
  to RAM (as clearMemory did), because they could be seen uncached by
  devices. Page tables only to PoU for the page table walker.

- Before createNewObject in retype, these objects do not exist and
  cannot be seen by any part of the system. createNewObject is the point
  where new objects can become visible to the user.

- Theoretically, we could defer flushing further to the point where
  frames or page tables are mapped, but it is more complex to track
  whether a flush has already happened when they are mapped multiple
  times, whereas at retype the object cannot have been flushed already.

- The original implementation, before clearing memory was moved into
  reset untyped, also flushed at the same points.

Signed-off-by: Gerwin Klein <[email protected]>
@axel-h axel-h force-pushed the kernel-debug-log branch 3 times, most recently from 9a75785 to d96d76f Compare July 5, 2024 13:22
Axel Heider and others added 3 commits July 8, 2024 11:51
The function expects the size in bits.

Signed-off-by: Axel Heider <[email protected]>
The AARCH64 config now also works for functional correctness on
zcu102/zcu106 and rpi4.

Signed-off-by: Gerwin Klein <[email protected]>
Axel Heider and others added 16 commits July 8, 2024 12:10
- unify benchmarking across all architectures
- drop global variables ksExit, ksLogIndexFinalized
- improve comments

Signed-off-by: Axel Heider <[email protected]>
- cleanup includes and guards
- hide includes if features are not enabled.
- improve comments

Signed-off-by: Axel Heider <[email protected]>
Remove ksUserLogBuffer declaration from the state data and declare it in
the benchmark code instead.

Signed-off-by: Axel Heider <[email protected]>
add ENABLE_KERNEL_TRACEPOINTS

Signed-off-by: Axel Heider <[email protected]>
- define core specific timestampEnter
- remove generic ksExit

Signed-off-by: Axel Heider <[email protected]>
Rename CONFIG_KERNEL_LOG_BUFFER to CONFIG_ENABLE_KERNEL_LOG_BUFFER to
follow the logic used already for other automatically generated config
settings.

Signed-off-by: Axel Heider <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants