From: Geoff Levand <geoff@infradead.org>
To: Kevin Hao <haokexin@gmail.com>, Michael Ellerman <mpe@ellerman.id.au>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
Pavel Machek <pavel@ucw.cz>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread()
Date: Thu, 21 Dec 2023 15:36:54 +0900 [thread overview]
Message-ID: <d9ffe8a9-667b-4d73-a9f3-e06ccd627dfe@infradead.org> (raw)
In-Reply-To: <20231221044510.1802429-4-haokexin@gmail.com>
Hi Kevin,
On 12/21/23 13:45, Kevin Hao wrote:
> The kernel thread function ps3_probe_thread() invokes the try_to_freeze()
> in its loop. But all the kernel threads are non-freezable by default.
> So if we want to make a kernel thread to be freezable, we have to invoke
> set_freezable() explicitly.
>
> Signed-off-by: Kevin Hao <haokexin@gmail.com>
> ---
> arch/powerpc/platforms/ps3/device-init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c
> index e87360a0fb40..878bc160246e 100644
> --- a/arch/powerpc/platforms/ps3/device-init.c
> +++ b/arch/powerpc/platforms/ps3/device-init.c
> @@ -827,6 +827,7 @@ static int ps3_probe_thread(void *data)
> if (res)
> goto fail_free_irq;
>
> + set_freezable();
> /* Loop here processing the requested notification events. */
> do {
> try_to_freeze();
Seems like a reasonable addition.
Signed-off-by: Geoff Levand <geoff@infradead.org>
next prev parent reply other threads:[~2023-12-21 6:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-21 4:45 [PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread Kevin Hao
2023-12-21 4:45 ` [PATCH 1/3] powerpc: mpc83xx: Add the missing set_freezable() for agent_thread_fn() Kevin Hao
2023-12-21 4:45 ` [PATCH 2/3] powerpc: mpc83xx: Use wait_event_freezable() for freezable kthread Kevin Hao
2023-12-21 4:45 ` [PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread() Kevin Hao
2023-12-21 6:36 ` Geoff Levand [this message]
2023-12-21 11:17 ` Michael Ellerman
2023-12-31 11:07 ` [PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread Michael Ellerman
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=d9ffe8a9-667b-4d73-a9f3-e06ccd627dfe@infradead.org \
--to=geoff@infradead.org \
--cc=aneesh.kumar@kernel.org \
--cc=haokexin@gmail.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=pavel@ucw.cz \
--cc=rafael@kernel.org \
/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).