[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v9fbv8te.fsf@nanos.tec.linutronix.de>
Date: Thu, 15 Oct 2020 16:54:21 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org,
io-uring@...r.kernel.org, peterz@...radead.org
Subject: Re: [PATCH 4/5] x86: wire up TIF_NOTIFY_SIGNAL
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
Powered by blists - more mailing lists