Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp893066ybz; Wed, 22 Apr 2020 09:47:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIzSADeaW1dRcLGjovKfBrU1vVPvu5pCXWOVWlgM7GyGcyDdoc23CvDMr2eER70z87irHEl X-Received: by 2002:a17:907:2170:: with SMTP id rl16mr27677858ejb.238.1587574051804; Wed, 22 Apr 2020 09:47:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587574051; cv=none; d=google.com; s=arc-20160816; b=aadZkx6lGdvrxr6Dr29BdRoE7iuRqWcq+4BbX3gYkyo4uGz+PjXurE6LZwyU9TDwco iGNT3anY+vlp/uqGPhurvdeFad029emEX/MVu5Lv0DD+6xvMhco7lzOJrmCsRVp+p4Qd xgFKe+qhGEgR+XRuPg9ADkdDJqY5ZvzmKS3k80DllT/2vUDenKq30XkDy/4PFyQpUQWW 6ZeBHJjmwUzZttS6G/IyK0ojB3OFFtXiXkemfrLosIcZRWm7xA1n3/qI3SulIZa8kNu/ Sn61vJrp05HDyeBNj1iJ4PQgv5XwfCT/9gH+dYS1xURrDET8oc0dlZY4OXp5XiMiSPI8 SlKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=o/WwRiXH4Ed3HALcczmqQqhNgStpLDCuY0UuG9+EK3k=; b=pEmdrEmQVYeOO6prrGPk3dXX0zkdK2aVmEiXJrcNiN0PG5QZ+9N1FfEZCT82Eo749o czvibsjdliuaw8GfX8BpQA5qAWlvnBZEYifK3c4pXAOtUnLFBdbtEPnODmqhvhlxVbyh p/KWbRuWgQEsnGVCRw5Sx6++LCBW14/Fui2ZARC037wAae8f5KxZdlQI2fWopUOZz3qX IbT3Q8nPvjGZJzYylBdJD8YrvYI+sH+aTBQDHADvCWFCdDP6tnbNmlHifz/DFNQZ3pXx DAJUFiEgZFN5L93rjjqbvgD0Xg4hgmT/4mmWodsDHP1qO00y+q0L37LOlNpj1GRZoKiV GfVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x17si3518141ejs.372.2020.04.22.09.47.05; Wed, 22 Apr 2020 09:47:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726484AbgDVQpk (ORCPT + 99 others); Wed, 22 Apr 2020 12:45:40 -0400 Received: from foss.arm.com ([217.140.110.172]:52630 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726006AbgDVQpk (ORCPT ); Wed, 22 Apr 2020 12:45:40 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1813B1FB; Wed, 22 Apr 2020 09:45:40 -0700 (PDT) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 146903F6CF; Wed, 22 Apr 2020 09:45:37 -0700 (PDT) Subject: Re: [PATCH 04/23] sched,acpi_pad: Convert to sched_set_fifo*() To: Peter Zijlstra , mingo@kernel.org, linux-kernel@vger.kernel.org Cc: tglx@linutronix.de, rostedt@goodmis.org, qais.yousef@arm.com, juri.lelli@redhat.com, vincent.guittot@linaro.org, bsegall@google.com, mgorman@suse.de, rafael.j.wysocki@intel.com References: <20200422112719.826676174@infradead.org> <20200422112831.455977635@infradead.org> From: Dietmar Eggemann Message-ID: Date: Wed, 22 Apr 2020 18:45:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200422112831.455977635@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22/04/2020 13:27, Peter Zijlstra wrote: > 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) > Reviewed-by: Ingo Molnar > --- > drivers/acpi/acpi_pad.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > --- a/drivers/acpi/acpi_pad.c > +++ b/drivers/acpi/acpi_pad.c > @@ -136,12 +136,11 @@ static unsigned int idle_pct = 5; /* per > 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, ¶m); I was wondering what happened to the SCHED_RR cases but as I can see now they are handled here and in the next patch. > + sched_set_fifo_low(current); > > while (!kthread_should_stop()) { > unsigned long expire_time; > >