Message ID | 20231221044510.1802429-4-haokexin@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ccc0f7b7673e63139ba9d916f4567d4fadb14b55 |
Headers | show |
Series | powerpc: Fixes and optimization for the freezable kthread | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/github-powerpc_selftests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_ppctests | success | Successfully ran 8 jobs. |
snowpatch_ozlabs/github-powerpc_clang | success | Successfully ran 6 jobs. |
snowpatch_ozlabs/github-powerpc_kernel_qemu | success | Successfully ran 23 jobs. |
snowpatch_ozlabs/github-powerpc_sparse | success | Successfully ran 4 jobs. |
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>
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
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();
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(+)