Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2364321imm; Wed, 3 Oct 2018 02:42:52 -0700 (PDT) X-Google-Smtp-Source: ACcGV60GvUfwIe4QQvddj16Qp6pgMRo01CGltVd5gQfL+JUhpaDxcn1tTN5J78hITiuNCRTOIw7L X-Received: by 2002:a17:902:64c2:: with SMTP id y2-v6mr729065pli.35.1538559772184; Wed, 03 Oct 2018 02:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538559772; cv=none; d=google.com; s=arc-20160816; b=rC8qRCNT75wfrpu+zD7hhbxSQY5ITYXnPiOf5DbFv5F/sAtf2QCogRuv54Qt7fN46f 3vtW4MT6SOrsv3Fw0jtSXc30eH7RqfMGLbTPrF7R7lKeIxRQrQYTIzrmZYup3BLiIpvV N47D5vMsLP1gg6xbgISNR77gcsPqfh3nB4YuqFsDkJs5R/pq6jlDxk3OK4o6aIawO4Ph 00DxOQFuEfb6IfhlP4J4/sVw4khBQBwxA2icO2DQC+Y+inR1YvXLCvQyw0GyADKmRpcM Rpnd3PYW7g1NBeRI+yU/Ipx2Fvy7kzCSzGuEAKTGh3eum4JooQh67MY9yIdsdTa7mRNw XU4w== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ohSyJlUdBI1onFNZ+QA+HNHwJJGlQBoRN8Y79yIqj/c=; b=Wm32WlZlvp+96hsM99Yd8238Dn5V6N9OQmisUbCJZunDuSNhkXvlLiZWL1O0+CqhBu pfegacJWiCDnphOzNjG/E2e1IvV0Jtji1GEugRuUYgEXhGut9GPweekjjgYUsitqS0Ke uDuzUwdO3x27KRP6zV1k03Vv0mEUzcYe5/1cUyEq0K8CSjVM4Yl7+FviOeQTeO0GxHvV Bn4vC3XH84QIdGUlthaTQW6RxE/RkA9FgEoVYyLM19CLaKOr6KXU9JGp8ll4YztJYsUi 5+uYvWto0cr4RhjOv+wSk0ynVFo74ZJpgKVCNGXO4TW3t+JGnCxyi6UF+SbfPtoPbZSP HG2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7-v6si1052968plt.21.2018.10.03.02.42.36; Wed, 03 Oct 2018 02:42:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbeJCQ3i (ORCPT + 99 others); Wed, 3 Oct 2018 12:29:38 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:51722 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726807AbeJCQ3i (ORCPT ); Wed, 3 Oct 2018 12:29:38 -0400 Received: from 79.184.253.194.ipv4.supernova.orange.pl (79.184.253.194) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.148) id 6b40d08789310677; Wed, 3 Oct 2018 11:41:59 +0200 From: "Rafael J. Wysocki" To: Yu Chen Cc: Len Brown , linux-kernel@vger.kernel.org, Lenny Szubowicz , Jacob Pan , Rui Zhang , linux-acpi@vger.kernel.org Subject: Re: [PATCH][RFC v2] ACPI: acpi_pad: Do not launch acpi_pad threads on idle cpus Date: Wed, 03 Oct 2018 11:38:58 +0200 Message-ID: <3282057.yGUaGxRyCs@aspire.rjw.lan> In-Reply-To: <20180514154523.GA17331@sandybridge-desktop> References: <1525521202-32519-1-git-send-email-yu.c.chen@intel.com> <8775668.fKKdjnIWAU@aspire.rjw.lan> <20180514154523.GA17331@sandybridge-desktop> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, May 14, 2018 5:45:23 PM CEST Yu Chen wrote: > On Sun, May 13, 2018 at 11:30:52AM +0200, Rafael J. Wysocki wrote: > > On Saturday, May 5, 2018 1:53:22 PM CEST Chen Yu wrote: > > > According to current implementation of acpi_pad driver, > > > it does not make sense to spawn any power saving threads > > > on the cpus which are already idle - it might bring > > > unnecessary overhead on these idle cpus and causes power > > > waste. So verify the condition that if the number of 'busy' > > > cpus exceeds the amount of the 'forced idle' cpus is met. > > > This is applicable due to round-robin attribute of the > > > power saving threads, otherwise ignore the setting/ACPI > > > notification. > > > > OK, but CPUs are busy, because they are running tasks. If acpi_pad > > kthreads run on them, the tasks they are running will migrate to the > > currently idle CPUs (unless they have specific CPU affinity) and the > > throttling will not really be effective. > > > OK, I think this makes sense, I missed the load balance scenario. > > I would think that acpi_pad should ensure that the requested number of > > CPUs will not run anything other than throttling kthreads. Isn't that > > the case? > > > Do you mean, we should check if the number of 'idle'(rather than the 'busy' one > in this patch) cpus is larger than the requested one? Then I think we should also > add a patch to use the play_idle() as power_clamp to treat the throttling kthreads > as idle threads thus to stop system tick. Such as the patch Jacob proposed: I wonder if that can be switched over to the new idle injection framework added recently? Thanks, Rafael