Thread (40 messages) 40 messages, 6 authors, 2022-01-20

Re: [RFC][PATCH 3/3] sched: User Mode Concurency Groups

From: Peter Zijlstra <peterz@infradead.org>
Date: 2022-01-17 13:05:21
Also in: linux-mm, lkml

On Tue, Dec 21, 2021 at 05:19:00PM +0000, Peter Oskolkov wrote:
On Tue, Dec 14, 2021 at 09:44:48PM +0100, Peter Zijlstra wrote:
quoted
+static struct task_struct *umcg_get_task(u32 tid)
+{
+	struct task_struct *tsk = NULL;
+
+	if (tid) {
+		rcu_read_lock();
+		tsk = find_task_by_vpid(tid);
+		if (tsk && current->mm == tsk->mm && tsk->umcg_task)
This essentially limits all operations to a single mm/process.
Fine for now, but a fast remote context switch is also a valid use
case. It is not directly related to userspace scheduling, so I'm
just mentioning it here. Maybe server-to-server cross-process
context switches should be allowed for the same user/cgroup? (Again,
this is for later to consider).
Doing cross-address-space UMCG will be a massive effort, too much
(pretty much everything) in this implementation assumes things are
directly addressable.
quoted
+			get_task_struct(tsk);
+		else
+			tsk = NULL;
+		rcu_read_unlock();
+	}
+
+	return tsk;
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help