From: Rik van Riel <riel@surriel.com>
To: peterz@infradead.org, Peter Oskolkov <posk@posk.io>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Ingo Molnar <mingo@kernel.org>,
Darren Hart <dvhart@infradead.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
Peter Oskolkov <posk@google.com>,
Andrei Vagin <avagin@google.com>, Paul Turner <pjt@google.com>,
Ben Segall <bsegall@google.com>, Aaron Lu <aaron.lwe@gmail.com>
Subject: Re: [PATCH for 5.9 v2 1/4] futex: introduce FUTEX_SWAP operation
Date: Tue, 11 Aug 2020 11:26:20 -0400 [thread overview]
Message-ID: <b3c828825cc62ce79d16a2f1a840279b01f33848.camel@surriel.com> (raw)
In-Reply-To: <20200804123147.GI2674@hirez.programming.kicks-ass.net>
[-- Attachment #1: Type: text/plain, Size: 1562 bytes --]
On Tue, 2020-08-04 at 14:31 +0200, peterz@infradead.org wrote:
> On Mon, Aug 03, 2020 at 03:15:07PM -0700, Peter Oskolkov wrote:
> > A simplified/idealized use case: imagine a multi-user service
> > application
> > (e.g. a DBMS) that has to implement the following user CPU quota
> > policy:
>
> So the last posting made hackernews; and there a bunch expressed far
> more interest in coroutines, which, if I'm not mistaken, can also be
> implemented using all this.
>
> Would that not make for a far simpler and more convincing use-case?
Also just worker threads in general. Instead of waking up
an idle worker thread every time a new request comes in,
why not allow worker threads to indicate "I'm almost done",
and the main/receiving thread to enqueue the new request,
to be handled when the worker thread is done with the current
request?
> I really think we want to have block/resume detection sorted before
> this
> goes anywhere, I also strongly feel BPF should not be used for
> functional interfaces like that.
>
> That is, I want to see a complete interface before I want to commit
> to
> an ABI that we're stuck with.
The work case above also needs to have that figured out,
for the (slow path, but still common) case of the worker
thread actually having gone to sleep while the work got
enqueued, and then needing to be woken up anyway.
Not sure that is a direction you are interested in, given
the description, but it could make coroutines and worker
threads more efficient :)
--
All Rights Reversed.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-08-11 15:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 22:15 [PATCH for 5.9 v2 0/4] FUTEX_SWAP (tip/locking/core) Peter Oskolkov
2020-08-03 22:15 ` [PATCH for 5.9 v2 1/4] futex: introduce FUTEX_SWAP operation Peter Oskolkov
2020-08-04 12:31 ` peterz
2020-08-11 15:26 ` Rik van Riel [this message]
2020-08-03 22:15 ` [PATCH for 5.9 v2 2/4] futex: implement FUTEX_SWAP as wake+wait Peter Oskolkov
2020-08-03 22:15 ` [PATCH for 5.9 v2 3/4] futex/sched: add wake_up_swap, use in FUTEX_SWAP Peter Oskolkov
2020-08-03 22:15 ` [PATCH for 5.9 v2 4/4] selftests/futex: add futex_swap selftest Peter Oskolkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3c828825cc62ce79d16a2f1a840279b01f33848.camel@surriel.com \
--to=riel@surriel.com \
--cc=aaron.lwe@gmail.com \
--cc=avagin@google.com \
--cc=bsegall@google.com \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=posk@google.com \
--cc=posk@posk.io \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®