Thread (76 messages) flat view 76 messages, 12 authors, 2023-10-09

Re: [RFC PATCH v2 16/20] rcu: Make RCU dynticks counter size configurable

From: Valentin Schneider <vschneid@redhat.com>
Date: 2023-07-21 08:18:50
Also in: bpf, kvm, linux-doc, linux-kselftest, linux-mm, lkml, rcu

On 20/07/23 17:30, Valentin Schneider wrote:
quoted hunk ↗ jump to hunk
index bdd7eadb33d8f..1ff2aab24e964 100644
--- a/kernel/rcu/Kconfig
+++ b/kernel/rcu/Kconfig
@@ -332,4 +332,37 @@ config RCU_DOUBLE_CHECK_CB_TIME
        Say Y here if you need tighter callback-limit enforcement.
        Say N here if you are unsure.

+config RCU_DYNTICKS_RANGE_BEGIN
+	int
+	depends on !RCU_EXPERT
+	default 31 if !CONTEXT_TRACKING_WORK
You'll note that this should be 30 really, because the lower *2* bits are
taken by the context state (CONTEXT_GUEST has a value of 3).

This highlights the fragile part of this: the Kconfig values are hardcoded,
but they depend on CT_STATE_SIZE, CONTEXT_MASK and CONTEXT_WORK_MAX. The
static_assert() will at least capture any misconfiguration, but having that
enforced by the actual Kconfig ranges would be less awkward.

Do we currently have a way of e.g. making a Kconfig file depend on and use
values generated by a C header?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help