lkml.org 
[lkml]   [2020]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL
Date
On Thu, Oct 15 2020 at 16:34, Oleg Nesterov wrote:
> On 10/15, Thomas Gleixner wrote:
>> Instead of adding this to every architectures signal magic, we can
>> handle TIF_NOTIFY_SIGNAL in the core code:
>>
>> static void handle_singal_work(ti_work, regs)
>> {
>> if (ti_work & _TIF_NOTIFY_SIGNAL)
>> tracehook_notify_signal();
>>
>> arch_do_signal(ti_work, regs);
>> }
>>
>> loop {
>> if (ti_work & (SIGPENDING | NOTIFY_SIGNAL))
>> handle_signal_work(ti_work, regs);
>> }
>
> To me this looks like unnecessary complication. We need to change
> every architecture anyway, how can this helper help?

You need to change ONE architecture because nobody else uses the common
entry loop right now. For those who move over they have to supply
arch_do_signal() anyway, so the extra TIF check is not a problem.

We really don't want all architectures to have the same thing
copy&pasta'd. That's the whole point of common code to avoid that.

Thanks,

tglx

\
 
 \ /
  Last update: 2020-10-15 16:55    [W:0.123 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site