summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-14 14:05:41 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-10-14 14:05:41 -0400
commitfce5ab8d025799d71fbd260c4ef91a715497b54b (patch)
treeb832bd80bc53748eaf0574532793dc958b67aced /kernel/gsp_sema_service.c
parent6b090f70816f60a1a98fcf5889a3275177e8c132 (diff)
downloadopen-iov-fce5ab8d025799d71fbd260c4ef91a715497b54b.tar.gz
open-iov-fce5ab8d025799d71fbd260c4ef91a715497b54b.zip
vgsp-gr: enlarge the data bounce window to 208 pages (256 KB operands)
victory_matmul (256x256 float: 256 KB per operand) failed with all-wrong results while 128 KB workloads passed: the relocation bounce window was 112 pages with a 100-page data cap and 33 pages per pointer, so each 64-page operand was truncated and the engine ran on partial/mismatched windows. Grow the planted bounce window to 208 pages (main-PT slots 0x110..0x1df), move the mail page to the last data-free slot (206, marker 207), and raise the per-pointer cap to 68 pages and the data cap to 205 (three 256 KB operands = 3x68 = 204 <= 205). Operands larger than 256 KB still hit the cap and need a chunked data path (documented at the define).
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 10992c3..c07915f 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -12366,10 +12366,18 @@ static bool svc_gr_page_inline_covers(u64 page)
* accesses the tail: with 32 pages the tail read the NEXT candidate's
* relocated page (wrong values; vadd tails). 3x33=99 <= the 100-page cap.
*/
-#define SVC_GR_DATA_PAGES_PER_PTR 33u
-/* m114: total pages the pre-commit bounce window can carry (slot 100 is
- * the mail message). */
-#define SVC_GR_DATA_BOUNCE_MAX 100u
+/*
+ * m150 (large buffers): the bounce window was grown to 208 pages (mail page
+ * at slot 206). 68 pages per candidate/pointer covers a 256 KB cudaMalloc'd
+ * operand whose pointer sits 0x400 into its page (64 full + offset + tail),
+ * and up to three such operands (3x68 = 204 <= 205) fit below the mail page.
+ * Larger-than-256 KB operands still hit the cap; they need a chunked data
+ * path (future work).
+ */
+#define SVC_GR_DATA_PAGES_PER_PTR 68u
+/* Total pages the pre-commit bounce window can carry below the mail page
+ * (GSP_PHYS_RMCALL_GR_MAIL_SLOT = 206). */
+#define SVC_GR_DATA_BOUNCE_MAX 205u
static u32 svc_gr_data_log; /* m142: bounded per-page attribution log */
static u32 svc_gr_src_log; /* m150: bounded per-candidate source log */