From: Miroslav Benes <email@example.com>
To: Jens Axboe <firstname.lastname@example.org>
Cc: Oleg Nesterov <email@example.com>,
Subject: Re: [PATCHSET RFC v3 0/6] Add support for TIF_NOTIFY_SIGNAL
Date: Mon, 12 Oct 2020 19:27:48 +0200 (CEST) [thread overview]
Message-ID: <alpine.LSU.firstname.lastname@example.org> (raw)
On Sat, 10 Oct 2020, Jens Axboe wrote:
> On 10/9/20 9:21 AM, Jens Axboe wrote:
> > On 10/9/20 2:01 AM, Miroslav Benes wrote:
> >> On Thu, 8 Oct 2020, Oleg Nesterov wrote:
> >>> On 10/05, Jens Axboe wrote:
> >>>> Hi,
> >>>> The goal is this patch series is to decouple TWA_SIGNAL based task_work
> >>>> from real signals and signal delivery.
> >>> I think TIF_NOTIFY_SIGNAL can have more users. Say, we can move
> >>> try_to_freeze() from get_signal() to tracehook_notify_signal(), kill
> >>> fake_signal_wake_up(), and remove freezing() from recalc_sigpending().
> >>> Probably the same for TIF_PATCH_PENDING, klp_send_signals() can use
> >>> set_notify_signal() rather than signal_wake_up().
> >> Yes, that was my impression from the patch set too, when I accidentally
> >> noticed it.
> >> Jens, could you CC our live patching ML when you submit v4, please? It
> >> would be a nice cleanup.
> > Definitely, though it'd be v5 at this point. But we really need to get
> > all archs supporting TIF_NOTIFY_SIGNAL first. Once we have that, there's
> > a whole slew of cleanups that'll fall out naturally:
> > - Removal of JOBCTL_TASK_WORK
> > - Removal of special path for TWA_SIGNAL in task_work
> > - TIF_PATCH_PENDING can be converted and then removed
> > - try_to_freeze() cleanup that Oleg mentioned
> > And probably more I'm not thinking of right now :-)
> Here's the current series, I took a stab at converting all archs to
> support TIF_NOTIFY_SIGNAL so we have a base to build on top of. Most
> of them were straight forward, but I need someone to fixup powerpc,
> verify arm and s390.
> But it's a decent start I think, and means that we can drop various
> bits as is done at the end of the series. I could swap things around
> a bit and avoid having the intermediate step, but I envision that
> getting this in all archs will take a bit longer than just signing off
> on the generic/x86 bits. So probably best to keep the series as it is
> for now, and work on getting the arch bits verified/fixed/tested.
Crude diff for live patching on top of the series is below. Tested only on
x86_64, but it passes the tests without an issue.
diff --git a/kernel/livepatch/transition.c b/kernel/livepatch/transition.c
index f6310f848f34..3a4beb9395c4 100644
@@ -9,6 +9,7 @@
@@ -369,9 +370,7 @@ static void klp_send_signals(void)
* Send fake signal to all non-kthread tasks which are
* still not migrated.
- signal_wake_up(task, 0);
diff --git a/kernel/signal.c b/kernel/signal.c
index a15c584a0455..b7cf4eda8611 100644
@@ -181,8 +181,7 @@ void recalc_sigpending_and_wake(struct task_struct *t)
- if (!recalc_sigpending_tsk(current) && !freezing(current) &&
+ if (!recalc_sigpending_tsk(current) && !freezing(current))
next prev parent reply other threads:[~2020-10-12 17:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <email@example.com>
[not found] ` <20201008145610.GK9995@redhat.com>
2020-10-09 8:01 ` [PATCHSET RFC v3 0/6] Add support for TIF_NOTIFY_SIGNAL Miroslav Benes
2020-10-09 15:21 ` Jens Axboe
2020-10-10 16:53 ` Jens Axboe
2020-10-12 17:27 ` Miroslav Benes [this message]
2020-10-13 19:39 ` Jens Axboe
2020-10-13 23:34 ` Thomas Gleixner
2020-10-13 23:37 ` Jens Axboe
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).