Thread (57 messages) 57 messages, 3 authors, 2025-10-24

Re: [PATCH v2 20/20] rv: Add deadline monitors

From: Nam Cao <hidden>
Date: 2025-10-10 15:04:25
Also in: linux-doc, lkml

Gabriele Monaco [off-list ref] writes:
+/*
+ * Dummy values if not available
+ */
+#ifndef __NR_sched_setscheduler
+#define __NR_sched_setscheduler -1
+#endif
+#ifndef __NR_sched_setattr
+#define __NR_sched_setattr -2
+#endif
You can use __COUNTER__ intead, would make it easier to add to or remove
from this list later on.
+static void handle_syscall(void *data, struct pt_regs *regs, long id)
+{
+	struct task_struct *p;
+	int new_policy = -1;
+
+	new_policy = extract_params(regs, id, &p);
+	if (new_policy < 0 || new_policy == p->policy)
+		return;
+	if (p->policy == SCHED_DEADLINE)
+		da_reset(EXPAND_ID(&p->dl, DL_TASK));
+	else if (new_policy == SCHED_DEADLINE)
+		da_create_conditional(EXPAND_ID(&p->dl, DL_TASK), GFP_NOWAIT);
+}
What if the syscall fails for any reason? Wouldn't the monitor stores
incorrect information?

Nam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help