Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp602300ybz; Wed, 22 Apr 2020 04:33:11 -0700 (PDT) X-Google-Smtp-Source: APiQypLrKx8p5bwFwRM6dHpUEz6YZDd27d8uPPKhDtegTKwgKdzrQUw6zXJWCrAweLuT4TFKTNQ2 X-Received: by 2002:aa7:cdd9:: with SMTP id h25mr1590904edw.17.1587555191284; Wed, 22 Apr 2020 04:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587555191; cv=none; d=google.com; s=arc-20160816; b=ZJ9jvYHgmSgNVqCz5G3cy/tJBGD83HqViU3CcNYH1YsYDa9AF2NBuk3jfFfPPxiF75 ImIol4CRgCzEEaBse5YGRRsF98lN/0uDHjL4JsyhMKznfB+hNBwhcksxF7kZ/dw/mqtm Hnsl1PaMRdWTxeIS5VbSWXhNv5dwQmecfNVZ5L4cqIZ73+QF/c9AvbWT3hhZuOJh7yJX aH4amwmQKzhlltZrRWif6bifDSsdwMLRxEje5gwT33/CRToBqlQ2teko7KSAOywT2cXJ T6o9lShoM+cCsMpLcJ5QpnGxC1elT8nIHktFItGUfTmhzdVXwgEJcQn2oocPtV1rA8KZ rkuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:subject:cc:to :from:date:user-agent:message-id:dkim-signature; bh=hIBaCNSRemFVEzhqrrl9kg85oWY2pS0HF6ixxeBRHNw=; b=hx8wDJ+hAAu2fpXjYLrt2V0vLO2pjow6qcdgp5sK8xgZziX5StLmuAMF2n04wslUNm 6tk+wrYzYqwNYfsFQJQaAWTQax9segsG4YKd5ZX7hJLJbcQcYN9MlldJvd+ar0LJ807b FSb31QrLIUUE2u1Xa2rdWdUGU2ZNF3Kr85t8PKRbk7iG439hqVpNyGNts+1mdwQo3oVm AHzvYlLgx8UjSABT28rAbMQVm2r0AU8x4ugWqTR+PC2kmGl9jXWGiSX+VvVX6QfE2lj/ /Li/1KDwhWiJ9keJENw9lOIlg7nMaaJtF3nrloQjOh2xVY6qX2Q7lLKhfoDm7WYDxO/g PYcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hJK16TrS; 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 me7si3665881ejb.191.2020.04.22.04.32.48; Wed, 22 Apr 2020 04:33:11 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hJK16TrS; 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 S1728164AbgDVLah (ORCPT + 99 others); Wed, 22 Apr 2020 07:30:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726475AbgDVL3Z (ORCPT ); Wed, 22 Apr 2020 07:29:25 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 234A3C03C1AC for ; Wed, 22 Apr 2020 04:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=hIBaCNSRemFVEzhqrrl9kg85oWY2pS0HF6ixxeBRHNw=; b=hJK16TrSGxulCJj9Io39Ej14GX mSNdLOTjweF+330qm6SwbwIB/tTRjBUFRMCrvAOnau5zOXvu1sA84wE/0eeTyDDnPTo6U2EnY7u2T fViuUYCkEHP6oJwtAdKszqPitQHAzT5Fke+DrStSN0/kPhz4XqzLZsRAV+zEqU6hqBmr2r+jGSDhr OeOULyDLQqH5Q67o0uZo18x9fqx/LyS7QS04m8FvJzpI0DmCb/hF/u2/gO1nILyGfWDV10Mu8dm/c enHXE9pmk7Taj3YJuEu5M00oQ6vUc+Wwvfub+rhXT4ZeqBSV/FueuPCuwfRljlp3T4PwCNhLKaFUd MY4KmkZQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRDYx-0003aw-5r; Wed, 22 Apr 2020 11:29:07 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E6BDE30761D; Wed, 22 Apr 2020 13:29:02 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id C1E73200D6D77; Wed, 22 Apr 2020 13:29:02 +0200 (CEST) Message-Id: <20200422112831.455977635@infradead.org> User-Agent: quilt/0.65 Date: Wed, 22 Apr 2020 13:27:23 +0200 From: Peter Zijlstra To: 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, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, peterz@infradead.org, rafael.j.wysocki@intel.com Subject: [PATCH 04/23] sched,acpi_pad: Convert to sched_set_fifo*() References: <20200422112719.826676174@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); + sched_set_fifo_low(current); while (!kthread_should_stop()) { unsigned long expire_time;