All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Geoff Levand <geoff@infradead.org>, Kevin Hao <haokexin@gmail.com>
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 22:17:39 +1100	[thread overview]
Message-ID: <87le9nls8c.fsf@mail.lhotse> (raw)
In-Reply-To: <d9ffe8a9-667b-4d73-a9f3-e06ccd627dfe@infradead.org>

Geoff Levand <geoff@infradead.org> writes:
> 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>

I turned that into an Acked-by, which I think is what you meant :)

cheers

  reply	other threads:[~2023-12-21 11:18 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
2023-12-21 11:17     ` Michael Ellerman [this message]
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=87le9nls8c.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@kernel.org \
    --cc=geoff@infradead.org \
    --cc=haokexin@gmail.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.