Re: [PATCH] task_work: allow TWA_SIGNAL without a rescheduling IPI

From: Peter Zijlstra
Date: Thu Apr 28 2022 - 05:24:25 EST

On Mon, Apr 25, 2022 at 07:52:31PM -0600, Jens Axboe wrote:
> On 4/22/22 8:34 AM, Jens Axboe wrote:
> > Some use cases don't always need an IPI when sending a TWA_SIGNAL
> > notification. Add TWA_SIGNAL_NO_IPI, which is just like TWA_SIGNAL,
> > except it doesn't send an IPI to the target task. It merely sets
> > TIF_NOTIFY_SIGNAL and wakes up the task.

Could you perphaps elaborate on those use-cases? How do they guarantee
the task_work is ran before userspace?