From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com,
peterz@infradead.org, "Toke Høiland-Jørgensen" <toke@redhat.com>,
"Kalle Valo" <kvalo@kernel.org>,
"Johannes Berg" <johannes@sipsolutions.net>
Subject: Re: [PATCH v2] signal: break out of wait loops on kthread_stop()
Date: Tue, 28 Jun 2022 17:59:11 +0200 [thread overview]
Message-ID: <YrslT9h0whngMIhw@zx2c4.com> (raw)
In-Reply-To: <877d51udc7.fsf@email.froward.int.ebiederm.org>
Hi Eric,
On Mon, Jun 27, 2022 at 02:16:08PM -0500, Eric W. Biederman wrote:
> Semantically this makes a lot of sense.
>
> Bloating up signal_pending which is mainly called in non-kthread
> contexts is undesirable.
I guess I understand that concern, but does it really matter here? This
is called by code that waits anyway, so it's not like performance
matters at all, right?
> Instead could you modify kthread_stop to call set_notify_signal().
>
> That is exactly what set_notify_signal is there for. When you don't
> actually have a signal but you want to break out of an interruptible
> loop. My last round of work in the area decoupled set_notify_signal
> from any other semantics.
This sounds like the best option here, if in fact it does work. I'll
send in a patch for that and we can see how it interacts with the other
work you're doing.
Jason
next prev parent reply other threads:[~2022-06-28 15:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 12:00 [PATCH] signal: break out of wait loops on kthread_stop() Jason A. Donenfeld
2022-06-27 13:27 ` Peter Zijlstra
2022-06-27 14:54 ` Jason A. Donenfeld
2022-06-27 14:57 ` [PATCH v2] " Jason A. Donenfeld
2022-06-27 19:16 ` Eric W. Biederman
2022-06-28 15:59 ` Jason A. Donenfeld [this message]
2022-06-28 16:14 ` [PATCH v3] " Jason A. Donenfeld
2022-07-04 12:22 ` Jason A. Donenfeld
2022-07-11 17:53 ` Jason A. Donenfeld
2022-07-11 18:57 ` Eric W. Biederman
2022-07-11 20:18 ` Jason A. Donenfeld
2022-07-11 20:21 ` [PATCH v4] " Jason A. Donenfeld
2022-07-11 22:05 ` Eric W. Biederman
2022-07-11 23:21 ` [PATCH v5] " Jason A. Donenfeld
2022-07-12 0:00 ` Eric W. Biederman
2022-07-12 0:18 ` Jason A. Donenfeld
2022-07-11 22:04 ` [PATCH v3] " Eric W. Biederman
Reply instructions:
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YrslT9h0whngMIhw@zx2c4.com \
--to=jason@zx2c4.com \
--cc=ebiederm@xmission.com \
--cc=johannes@sipsolutions.net \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).