lkml.org 
[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: sched/fifo] sched,acpi_pad: Convert to sched_set_fifo*()
The following commit has been merged into the sched/fifo branch of tip:

Commit-ID: 4ca6c1a060943161c6c2ce09e02ed58a69669cfe
Gitweb: https://git.kernel.org/tip/4ca6c1a060943161c6c2ce09e02ed58a69669cfe
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Tue, 21 Apr 2020 12:09:13 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 15 Jun 2020 14:10:20 +02:00

sched,acpi_pad: Convert to sched_set_fifo*()

Because SCHED_FIFO is a broken scheduler model (see previous patches)
take away the priority field, the kernel can't possibly make an
informed decision.

In this case, use fifo_low, because it only cares about being above
SCHED_NORMAL. Effectively no change in behaviour.

XXX: this driver is still complete crap; why isn't it using proper
idle injection or at the very least play_idle() ?

Cc: rafael.j.wysocki@intel.com
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
---
drivers/acpi/acpi_pad.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index e7dc013..0ad9f20 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -136,12 +136,11 @@ static unsigned int idle_pct = 5; /* percentage */
static unsigned int round_robin_time = 1; /* second */
static int power_saving_thread(void *data)
{
- struct sched_param param = {.sched_priority = 1};
int do_sleep;
unsigned int tsk_index = (unsigned long)data;
u64 last_jiffies = 0;

- sched_setscheduler(current, SCHED_RR, &param);
+ sched_set_fifo_low(current);

while (!kthread_should_stop()) {
unsigned long expire_time;
\
 
 \ /
  Last update: 2020-07-24 10:35    [W:0.027 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site