Re: [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux