Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1597020ybz; Thu, 23 Apr 2020 01:50:51 -0700 (PDT) X-Google-Smtp-Source: APiQypIOayDlItGOq02z4O0d+skZun6+2HxGE7o/tbi6/lk4wHwnGyTuSVIbvWnAin9AwwDqqtuP X-Received: by 2002:a17:907:435d:: with SMTP id oc21mr1867772ejb.100.1587631851231; Thu, 23 Apr 2020 01:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587631851; cv=none; d=google.com; s=arc-20160816; b=fCyyINoIDieG9z5aL5XRFoXATjojbMrl1SElQwfGuxM01Jo4mRcNEOzRbUYnziJwwZ rpYuMLceSlrju9jdHIL61YVmXk9GjM1qfNBtTpfolEl2VjhFLdAbkYM84xBhBCu05cQG 7INqD+tInYzEK5L8w3ROEzkMxYuDSIwFJjdTuuvxS1MX0+qfHm1/6Z+vTAT1F+gi9CgA CfUj/vTZS1Dg7UObxefZFtPDbW8p76N7cwqeVbjVcX30P9zVGANgzghm/hH2HYE9W1wz hHaTeX2wS+yvCQ4i2KsVAQwzLkNDPkg33YULBVXQqJ/YH9yanqb2Bjr80g7IM0wE3NV7 YJMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=pdOPuyAEsL0uTW547isQ3x2UrY6A2JZipdSfI4TDH+o=; b=V/BEHidLo55ZLKJ68iL1fGCvm5Iw048ixCKxmdk0fUUej4bU5O96lofrdEuQouY3xx lZTGBiaCvZQ9aVaSiX1MB7gSLt8Mm5F15FtArhSJNHhnTpNNJZMg2cxzro9XYbIszLlL ZCXvHnqE9dmfpcZ2svjcNlYg3fi9dI59Ma+T8N8l+e9lDuWFxfpGL7pyCs/LIFtOzTg8 7umNVbBOhs+VUjpXBUO5ut0WfSmwWr4taloP1GzCsbqgAYesNSZn7sxl1H8F0wiKE+EH q/6soZKPgkI11jxkoqhF1JDJEOEbHI7Vuq3fARnjQ5W8B+HKWxbWK2YDu91T5GTjPB0k 0YgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=eaSzW00D; 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 x5si841366edr.583.2020.04.23.01.50.28; Thu, 23 Apr 2020 01:50:51 -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=merlin.20170209 header.b=eaSzW00D; 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 S1726547AbgDWIrG (ORCPT + 99 others); Thu, 23 Apr 2020 04:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgDWIrG (ORCPT ); Thu, 23 Apr 2020 04:47:06 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA938C03C1AF for ; Thu, 23 Apr 2020 01:47:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pdOPuyAEsL0uTW547isQ3x2UrY6A2JZipdSfI4TDH+o=; b=eaSzW00DUSBBbn/OWLhd07a5Vf gFxPFHWEN58PlGfVTwU126p0M/FLh6VB6I8VwF1+GwbtmqGZc94vnNpexjDjcgEHQ2DmDk2RTj4A4 fr5p8pnnLuPTKqw5z9KRic5rumyAbZyXq/GEgDq441mWKmQAxlGC4CDo8lLFxMpKBTjHT2XdnnlqU p3WASS7gBokwwT8n4eGZzLYkDnwf8FYVA4Xewke4nGp+yznD28/m51DUHPg7I6uAyPAA+MUbhUWc5 jSgZP01tPnIGKIlmk9fHYbd/FyYdkC3niXjZAPm5Ug7zzLkgwTh4Z2vXb7gNi+J+xXpTEzIgCUs1M SY22pWbg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jRXV7-0002uN-Im; Thu, 23 Apr 2020 08:46:29 +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 D02C93010C8; Thu, 23 Apr 2020 10:46:26 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8F19A20BE0448; Thu, 23 Apr 2020 10:46:26 +0200 (CEST) Date: Thu, 23 Apr 2020 10:46:26 +0200 From: Peter Zijlstra To: Dietmar Eggemann Cc: mingo@kernel.org, linux-kernel@vger.kernel.org, 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 Subject: Re: [PATCH 04/23] sched,acpi_pad: Convert to sched_set_fifo*() Message-ID: <20200423084626.GT20713@hirez.programming.kicks-ass.net> References: <20200422112719.826676174@infradead.org> <20200422112831.455977635@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 22, 2020 at 06:45:36PM +0200, Dietmar Eggemann wrote: > 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. Oh right; I completely forgot to mention that in the Changelog didn't I :-( In this case, this driver is a broken piece of crap and doing fake idle with RR is just plain idiotic. Also note the WARNs in play_idle(). Also, rjw, what was the point of renmaing play_idle() to play_idle_precise() if there is only one anyway? The changelog talks about adding play_idle_precise() but the patch (rightfully) doesn't add another version but replaces the existing one. But why change the name?!