From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755688AbcK1VsV (ORCPT ); Mon, 28 Nov 2016 16:48:21 -0500 Received: from mga09.intel.com ([134.134.136.24]:22436 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754377AbcK1VsM (ORCPT ); Mon, 28 Nov 2016 16:48:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,565,1473145200"; d="scan'208";a="35248692" Date: Mon, 28 Nov 2016 13:46:22 -0800 From: Jacob Pan To: "Rafael J. Wysocki" Cc: Peter Zijlstra , Ingo Molnar , Thomas Gleixner , LKML , Linux PM , Arjan van de Ven , Srinivas Pandruvada , Len Brown , Rafael Wysocki , Eduardo Valentin , Zhang Rui , Petr Mladek , Sebastian Andrzej Siewior , jacob.jun.pan@linux.intel.com Subject: Re: [PATCH v4 1/2] idle: add support for tasks that inject idle Message-ID: <20161128134622.622689ab@icelake> In-Reply-To: References: <1480368809-23685-1-git-send-email-jacob.jun.pan@linux.intel.com> <1480368809-23685-2-git-send-email-jacob.jun.pan@linux.intel.com> Organization: OTC X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Nov 2016 22:39:07 +0100 "Rafael J. Wysocki" wrote: > On Mon, Nov 28, 2016 at 10:33 PM, Jacob Pan > wrote: > > From: Peter Zijlstra > > > > Idle injection drivers such as Intel powerclamp and ACPI PAD > > drivers use realtime tasks to take control of CPU then inject idle. > > There are two issues with this approach: > > > > 1. Low efficiency: injected idle task is treated as busy so sched > > ticks do not stop during injected idle period, the result of these > > unwanted wakeups can be ~20% loss in power savings. > > > > 2. Idle accounting: injected idle time is presented to user as > > busy. > > > > This patch addresses the issues by introducing a new PF_IDLE flag > > which allows any given task to be treated as idle task while the > > flag is set. Therefore, idle injection tasks can run through the > > normal flow of NOHZ idle enter/exit to get the correct accounting > > as well as tick stop when possible. > > > > The implication is that idle task is then no longer limited to PID > > == 0. > > > > Acked-by: Ingo Molnar > > Signed-off-by: Peter Zijlstra > > Signed-off-by: Jacob Pan > > Have you made any changes to the original Peter's patch, or is this > just a resend of that? No changes made to Peter's patch. I just rebased to v4.9-rc7 and tested it.