[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPNVh5f6iaiYP8E2jKioirjJdwJDoJT-KHQLKjtgbr68H8-HxQ@mail.gmail.com>
Date: Tue, 14 Sep 2021 09:51:28 -0700
From: Peter Oskolkov <posk@...gle.com>
To: Jann Horn <jannh@...gle.com>
Cc: Peter Oskolkov <posk@...k.io>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
Paul Turner <pjt@...gle.com>, Ben Segall <bsegall@...gle.com>,
Andrei Vagin <avagin@...gle.com>,
Thierry Delisle <tdelisle@...terloo.ca>
Subject: Re: [PATCH 3/4 v0.5] sched/umcg: RFC: implement UMCG syscalls
On Wed, Sep 8, 2021 at 6:40 PM Jann Horn <jannh@...gle.com> 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()...
[...]
Powered by blists - more mailing lists