summaryrefslogtreecommitdiffstats
path: root/arch/um/include/shared/common-offsets.h
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2024-10-10 16:25:37 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-10-23 09:52:49 +0200
commit0b8b2668f9981c1fefc2ef892bd915288ef01f33 (patch)
treef6ab4464c0555dbf073d5e65d46a652da5ac9c6e /arch/um/include/shared/common-offsets.h
parentum: Rename _PAGE_NEWPAGE to _PAGE_NEEDSYNC (diff)
downloadlinux-0b8b2668f9981c1fefc2ef892bd915288ef01f33.tar.xz
linux-0b8b2668f9981c1fefc2ef892bd915288ef01f33.zip
um: insert scheduler ticks when userspace does not yield
In time-travel mode userspace can do a lot of work without any time passing. Unfortunately, this can result in OOM situations as the RCU core code will never be run. Work around this by keeping track of userspace processes that do not yield for a lot of operations. When this happens, insert a jiffie into the sched_clock clock to account time against the process and cause the bookkeeping to run. As sched_clock is used for tracing, it is useful to keep it in sync between the different VMs. As such, try to remove added ticks again when the actual clock ticks. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Link: https://patch.msgid.link/20241010142537.1134685-1-benjamin@sipsolutions.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'arch/um/include/shared/common-offsets.h')
-rw-r--r--arch/um/include/shared/common-offsets.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/include/shared/common-offsets.h b/arch/um/include/shared/common-offsets.h
index 579ed946a3a9..86537e20942a 100644
--- a/arch/um/include/shared/common-offsets.h
+++ b/arch/um/include/shared/common-offsets.h
@@ -28,4 +28,8 @@ DEFINE(UML_CONFIG_64BIT, CONFIG_64BIT);
#ifdef CONFIG_UML_TIME_TRAVEL_SUPPORT
DEFINE(UML_CONFIG_UML_TIME_TRAVEL_SUPPORT, CONFIG_UML_TIME_TRAVEL_SUPPORT);
#endif
-
+#ifdef CONFIG_UML_MAX_USERSPACE_ITERATIONS
+DEFINE(UML_CONFIG_UML_MAX_USERSPACE_ITERATIONS, CONFIG_UML_MAX_USERSPACE_ITERATIONS);
+#else
+DEFINE(UML_CONFIG_UML_MAX_USERSPACE_ITERATIONS, 0);
+#endif