[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210713140235.GE4170@worktop.programming.kicks-ass.net>
Date: Tue, 13 Jul 2021 16:02:35 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Peter Oskolkov <posk@...gle.com>
Cc: Thierry Delisle <tdelisle@...terloo.ca>, avagin@...gle.com,
bsegall@...gle.com, jannh@...gle.com, jnewsome@...project.org,
joel@...lfernandes.org, linux-api@...r.kernel.org,
linux-kernel@...r.kernel.org, mingo@...hat.com,
mkarsten@...terloo.ca, pabuhr@...terloo.ca, pjt@...gle.com,
posk@...k.io, tglx@...utronix.de
Subject: Re: [RFC PATCH 3/3 v0.2] sched/umcg: RFC: implement UMCG syscalls
On Mon, Jul 12, 2021 at 04:31:01PM -0700, Peter Oskolkov wrote:
> On Mon, Jul 12, 2021 at 2:44 PM Thierry Delisle <tdelisle@...terloo.ca> wrote:
> > So what I am asking is: is UMCG_WAIT_WAKE_ONLY needed?
>
> Because the approach you described has been tried last year and was NACKed:
> https://lore.kernel.org/lkml/20200722234538.166697-1-posk@posk.io/
>
> In short, futex maintainers do not want to touch the existing futex
> code at all other than for bugfixes. No new futex functionality,
> period. See e.g. futex2 efforts:
> https://lore.kernel.org/lkml/20210603195924.361327-1-andrealmeid@collabora.com/
These are two orthogonal issues. We do not want to make the futex
multiplex monster worse, but that's not the reason for rejecting
FUTEX_SWAP.
The problem with FUTEX_SWAP is that it doesn't even begin to solve the
posed problem, namely N:M threading that natively allows blocking
syscalls (IOW without wrapping all syscalls).
This means we need kernel->user notification of tasks that block and
wakeup, such that the userspace scheduler can adequately react. This is
not something that sanely fits in futex.
It also requires an additional kernel side block point such that tasks
that blocked in-kernel, will not resume userspace when the userspace
scheduler decided to run another task in its stead.
These things are what resulted in UMCG.
Powered by blists - more mailing lists