[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ce2160c6-666b-0231-3c8d-499958ef733d@kernel.dk>
Date: Fri, 16 Oct 2020 12:05:50 -0600
From: Jens Axboe <axboe@...nel.dk>
To: Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>
Cc: linux-kernel@...r.kernel.org, io-uring@...r.kernel.org,
peterz@...radead.org, Roman Gershman <romger@...zon.com>
Subject: Re: [PATCH 5/5] task_work: use TIF_NOTIFY_SIGNAL if available
On 10/16/20 12:03 PM, Thomas Gleixner wrote:
> On Fri, Oct 16 2020 at 08:53, Jens Axboe wrote:
>> On 10/16/20 8:51 AM, Oleg Nesterov wrote:
>>> On 10/16, Thomas Gleixner wrote:
>>>>
>>>> With moving the handling into get_signal() you don't need more changes
>>>> to arch/* than adding the TIF bit, right?
>>>
>>> we still need to do something like
>>>
>>> - if (thread_flags & _TIF_SIGPENDING)
>>> + if (thread_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
>>> do_signal(...);
>>>
>>> and add _TIF_NOTIFY_SIGNAL to the WORK-PENDING mask in arch/* code.
>>
>> Yes, but it becomes really minimal at that point, and just that. There's
>> no touching any of the arch do_signal() code.
>>
>> Just finished the update of the branch to this model, and it does simplify
>> things quite a bit! Most arch patches are now exactly just what you write
>> above, no more.
>
> Except for all the nasty ones which have these checks in ASM :)
Actually not that many of them, and the biggest part of that set are
easy enough too (just adding the mask to the check). The only exceptions
are where TIF_NOTIFY_SIGNAL end up spilling over 8/16-bit, and the
particular arch currently uses some mask compare variant that now needs
to be modified. powerpc was the worst there, but I'm told a free bit
will show up in the merge window so all my powerpc asm fiddling was for
naught :-)
Only remaining issue I'm aware of in the arch conversions is arm, which
runs into this exact issue. Need to check with some arm guys on what the
best approach is there...
--
Jens Axboe
Powered by blists - more mailing lists