Thread (27 messages) flat view 27 messages, 6 authors, 2021-09-15

Re: [PATCH 3/4 v0.5] sched/umcg: RFC: implement UMCG syscalls

From: Peter Oskolkov <hidden>
Date: 2021-09-14 16:51:44
Also in: lkml

On Wed, Sep 8, 2021 at 6:40 PM Jann Horn [off-list ref] wrote:

[...]
I think umcg_idle_loop() should never be called from scheduler
callbacks (meaning umcg_wq_worker_running()), only from UMCG syscalls.
I'm moving umcg_wq_worker_running() out of
core.c/sched_update_worker() and into
/kernel/entry/common.c/exit_to_user_mode_loop()
(and will rename the function appropriately).
It seems rescheduling/sleeping there is fine.

I'm not yet sure if this is all that is needed to deal with
UMCG_TF_PREEMPTED flag; but I don't expect to see
any locks held when the task truly returns to the userspace.

Maybe I'll need to set TIF_NOTIFY_RESUME in sched_update_worker()...

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