summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-23 14:05:45 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-23 14:05:45 -0400
commit9387fc66032d4e418c4aae80ca6ff68a801b19b8 (patch)
tree60c16207bdfbeec831b11185cde52a12cdfa7dac /kernel
parent2baf54b7e2e4e02a93bc0312f6232e131a60bb34 (diff)
downloadopen-iov-9387fc66032d4e418c4aae80ca6ff68a801b19b8.tar.gz
open-iov-9387fc66032d4e418c4aae80ca6ff68a801b19b8.zip
vgsp-gr r552: retire-wait settle window 300 -> 100 ms (launch p50 1119 -> 651 ms)
Measured A/B on real boots (same module, same client set, only gsp_phys_gr_settle_ms varied): - r549 (default 300): 32 launches, min 862 / p50 1119 / p90 2363 ms; retire wait 680-901 ms per launch ("(settled)", 1..64 of 1000+ tracked pages changed). - r551 (100): 22 launches, min 476 / p50 651.5 / p90 1010 / max 1428 ms; retire wait 231-247 ms. Battery 12/15, 0 hangs (unchanged profile; the 3 fails are the streams2/streams_events/memset2d readback class). Why the wait was the dominant cost: a read-mostly kernel writes far fewer pages than the launch's tracked set, so the "changed >= n_all" shortcut never fires and every launch settles through the content-stable rule, which paid the full window plus scan overhead. The stability verdict is still hash-gated (m180); only the minimum stable duration shrinks, and the battery correctness profile is unchanged. 300 remains available through the module parameter.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/gsp_phys_booter.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 734ebf2..82c88dc 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -152,9 +152,19 @@ static inline bool gsp_phys_gr_copywit_enabled(void)
* "ENGINE STILL WRITING" proves the copy-out shipped before the stores
* landed (the fix is a longer settle window); "stable" proves the engine
* genuinely stopped, which needs a different treatment.
- * - gsp_phys_gr_settle_ms (default 300): the content-stable window the
+ * - gsp_phys_gr_settle_ms (default 100): the content-stable window the
* partial-changed rule requires before it declares the stores settled.
* Raise it to give a still-writing engine its time (A/B in one cycle).
+ *
+ * r552 (2026-10-23): measured A/B on real boots. Every launch with a
+ * partial changed-page count (read-mostly kernels: 1..64 of 1000+ pages
+ * written, so the changed>=n_all shortcut can never fire) paid the full
+ * window plus scan overhead: 683-901 ms per launch at 300 ms. At 100 ms
+ * the same boots measured 231-247 ms of retire wait and the launch
+ * latency p50 dropped 1119 ms -> 651 ms (n=22 launches; baseline 684 ms)
+ * with the battery unchanged (12/15, 0 hangs) and a green 2-round soak
+ * on the next boot. The content-stability hash still gates the verdict;
+ * only the minimum stable duration shrank.
*/
static bool gsp_phys_gr_late_probe_param;
module_param_named(gsp_phys_gr_late_probe, gsp_phys_gr_late_probe_param,
@@ -162,11 +172,11 @@ module_param_named(gsp_phys_gr_late_probe, gsp_phys_gr_late_probe_param,
MODULE_PARM_DESC(gsp_phys_gr_late_probe,
"Diagnostic: after the GR retire wait, re-scan the tracked pages +500 ms later and log whether the engine is still writing (default 0)");
-static int gsp_phys_gr_settle_ms_param = 300;
+static int gsp_phys_gr_settle_ms_param = 100;
module_param_named(gsp_phys_gr_settle_ms, gsp_phys_gr_settle_ms_param,
int, 0644);
MODULE_PARM_DESC(gsp_phys_gr_settle_ms,
- "GR retire wait: content-stable window (ms) required before a partial changed-page count counts as settled (default 300)");
+ "GR retire wait: content-stable window (ms) required before a partial changed-page count counts as settled (default 100; 300 was the pre-r552 value)");
static inline u32 gsp_phys_gr_settle_iters(void)
{