git: 76186d25a4 - main - Status/2024Q2/zcond.adoc: Add report

Lorenzo Salvadore <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by salvadore:

URL: https://cgit.FreeBSD.org/doc/commit/?id=76186d25a4627438dae2403a108d7866d0c9b0ef

commit 76186d25a4627438dae2403a108d7866d0c9b0ef
Author:     Marko Vlaić <[email protected]>
AuthorDate: 2024-07-07 13:14:15 +0000
Commit:     Lorenzo Salvadore <[email protected]>
CommitDate: 2024-07-07 13:16:05 +0000

    Status/2024Q2/zcond.adoc: Add report
---
 website/content/en/status/zcond.adoc | 43 ++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/website/content/en/status/zcond.adoc b/website/content/en/status/zcond.adoc
new file mode 100644
index 0000000000..c9fefeb27a
--- /dev/null
+++ b/website/content/en/status/zcond.adoc
@@ -0,0 +1,43 @@
+=== A low-cost conditional execution mechanism
+
+Links: +
+link:https://wiki.freebsd.org/SummerOfCode2024Projects/ZeroCostConditionalExecutionMechanism[FreeBSD wiki] URL: https://wiki.freebsd.org/SummerOfCode2024Projects/ZeroCostConditionalExecutionMechanism[] +
+
+Contact: Marko Vlaić <[email protected]>
+Contact: Bojan Novković (mentor) <[email protected]>
+
+This project aims to implement a low-cost conditional execution mechanism, similar to the `static_key` interface in Linux.
+The current working name is `zcond`, as in zero-cost conditional.
+The idea is to reduce the overhead of rarely used features in performance sensitive kernel code paths.
+Specifically, code blocks of the following, simple structure, are targeted:
+
+[source, c]
+----
+if(some_global_flag == true) {
+    do_some_additional_task();
+}
+----
+
+A block like this can cause performance overhead in a frequently executed piece of code.
+
+The motivating use case for the mechanism is tracing (as outlined here in the link:https://wiki.freebsd.org/SummerOfCodeIdeas#Unified_kernel_tracing_interface[wiki]), but the project will identify more areas where this mechanism could be applied.
+
+The backbone of the mechanism is runtime instruction hot patching, making it highly architecture dependent.
+Great care has to be given to security, because kernel instructions are overwritten at runtime.
+More details and some implementation ideas can be found in the project proposal on the link:https://wiki.freebsd.org/SummerOfCode2024Projects/ZeroCostConditionalExecutionMechanism[project wiki page].
+More documents describing the implementation and design decisions will be produced, as the project moves along.
+
+The goal of the project is to produce a working implementaion of the mechanism for the x86-64 architecture.
+It will then be applied to an existing piece of kernel code and benchmarked.
+If the benchmark results come out positive, it will be ported to other architectures.
+
+This project is a part of the link:https://summerofcode.withgoogle.com/[Google Summer of Code 2024.].
+The project is still in its early stages, but any feedback would be highly appreciated.
+
+==== Help wanted
+* General feedback on the mechanism, API and implementation
+* More use cases besides tracing are welcome
+* Code review
+* Name suggestions
+
+Sponsor: Google LLC (GSoC 2024)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.