Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1255631 > unrolled thread

[PATCH] ACPI/PAD: power_saving_thread() is not freezable

Started byJiri Kosina <jikos@kernel.org>
First post2015-10-26 04:10 +0100
Last post2015-10-28 04:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ACPI/PAD: power_saving_thread() is not freezable Jiri Kosina <jikos@kernel.org> - 2015-10-26 04:10 +0100
    Re: [PATCH] ACPI/PAD: power_saving_thread() is not freezable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-10-28 04:00 +0100

#1255631 — [PATCH] ACPI/PAD: power_saving_thread() is not freezable

FromJiri Kosina <jikos@kernel.org>
Date2015-10-26 04:10 +0100
Subject[PATCH] ACPI/PAD: power_saving_thread() is not freezable
Message-ID<qnGkx-2Sr-7@gated-at.bofh.it>
From: Jiri Kosina <jkosina@suse.cz>

power_saving_thread() calls try_to_freeze(), but the thread doesn't mark
itself freezable through set_freezable(), so the try_to_freeze()
call is useless.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/acpi/acpi_pad.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index ae307ff..8ea8211 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -148,8 +148,6 @@ static int power_saving_thread(void *data)
 	while (!kthread_should_stop()) {
 		unsigned long expire_time;
 
-		try_to_freeze();
-
 		/* round robin to cpus */
 		expire_time = last_jiffies + round_robin_time * HZ;
 		if (time_before(expire_time, jiffies)) {
-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1257621

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-10-28 04:00 +0100
Message-ID<qop7Y-57O-17@gated-at.bofh.it>
In reply to#1255631
On Monday, October 26, 2015 04:02:01 AM Jiri Kosina wrote:
> From: Jiri Kosina <jkosina@suse.cz>
> 
> power_saving_thread() calls try_to_freeze(), but the thread doesn't mark
> itself freezable through set_freezable(), so the try_to_freeze()
> call is useless.
> 
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
>  drivers/acpi/acpi_pad.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
> index ae307ff..8ea8211 100644
> --- a/drivers/acpi/acpi_pad.c
> +++ b/drivers/acpi/acpi_pad.c
> @@ -148,8 +148,6 @@ static int power_saving_thread(void *data)
>  	while (!kthread_should_stop()) {
>  		unsigned long expire_time;
>  
> -		try_to_freeze();
> -
>  		/* round robin to cpus */
>  		expire_time = last_jiffies + round_robin_time * HZ;
>  		if (time_before(expire_time, jiffies)) {
> 

Applied, thanks!

Rafael

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web