lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch v4 1/8] add basic task isolation prctl interface
On Thu, Oct 07, 2021 at 04:23:47PM -0300, Marcelo Tosatti wrote:
> Add basic prctl task isolation interface, which allows
> informing the kernel that application is executing
> latency sensitive code (where interruptions are undesired).
>
> Interface is described by task_isolation.rst (added by
> next patch).

That does not absolve you from actually writing a changelog here.
Life is too short to try and read rst shit.

What is the envisioned usage of these isolating prctl() thingies,
including the kill-me-on-any-interruption thing, vs the inherently racy
nature of some of the don't disturb me stuff.

Also, see:

https://lkml.kernel.org/r/20210929152429.186930629@infradead.org

Suppose:

CPU0 CPU1

sys_prctl()
<kernel entry>
// marks task 'important'
text_poke_sync()
// checks CPU0, not userspace, queues IPI
<kernel exit>

$important userspace arch_send_call_function_ipi_mask()
<IPI>
// finds task is 'important' and
// can't take interrupts
sigkill()

*Whoopsie*


Fundamentally CPU1 can't elide the IPI until CPU0 is in userspace,
therefore CPU0 can't wait for quescence in kernelspace, but if it goes
to userspace, it'll get killed on interruption. Catch-22.

\
 
 \ /
  Last update: 2021-10-12 15:07    [W:0.096 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site