Received: by 10.223.185.116 with SMTP id b49csp6088271wrg; Thu, 8 Mar 2018 01:23:33 -0800 (PST) X-Google-Smtp-Source: AG47ELtnUCGs9vgMncfGBhd4qZm6Jl4j3rsxUSOEz+N49yezJsyr/ZvTBObhokF7YkShcTaw6lS/ X-Received: by 10.99.124.7 with SMTP id x7mr20470442pgc.356.1520501012995; Thu, 08 Mar 2018 01:23:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520501012; cv=none; d=google.com; s=arc-20160816; b=diF9L/uyzujCbX7vDl4TwASIhhiRTxJjBpJXkbIPmXFwPxkGR9LSDxIKcHNTkcE05Y ZmACqnzo+SPhcoQppdL9/n5Ta+LEHbLI/Nw9odpTAJUkXy6Lb3sfkKtopEGJNtmxTsKQ mlOw2gzy2pB/tAi/678MV5KxT1X/lNRJh4SIXt4pjymD9ZVeW+vHsQTcgYfny5Sj422l g6uMio1VBapsYZFtsnR2gmmHczm+CvHYS88P3ZFUaMOY5zTMZPoOfILaUlNfvoElKxB8 5HBPzNzfL9PC5YOyCXJhkAM+qx0U0igrsoY5+Motqzkqos5EhAVwdT4jMrXvqQTCHCVr TWIg== 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 :arc-authentication-results; bh=AMrymYyFmmDOI25AkOFl5sWAo6r9UgFMkLa3j21cRlc=; b=VhdkM2FyCT0FpCFJaU7lYxc1G8Qg5OVOlb6lvvMdDhVjJj+kO4Ix6TtR/y03Lvnky9 U7xAyn8f0bcMS67Q/RFhMIc+WWvDPJ+eGnPa4yBKZJ3eetOoNnFrqqF+mXRidxqVRTPB /9hrMWT6b34I72tSvHHHMCf5IJOAHzkkPRQ5EYZS7/F9b+WKnL1gRFFx7wHgOfmVqtMI kPO3DZUeFVZingDA8sxIQ9bdwN5tHDH1ubgLsR0yGOfVT1O8x0SB9ZxT3/AKFJ6+BzLm oGasenSqcWg9pecPgX3E3dcEXXbTrGVQdUzNKHViKc5qZqMmSdyBjR4yLjbj34wrzN0U YLYg== 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 c200si15289899pfb.373.2018.03.08.01.23.18; Thu, 08 Mar 2018 01:23:32 -0800 (PST) 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 S935679AbeCHJVs (ORCPT + 99 others); Thu, 8 Mar 2018 04:21:48 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:44793 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935629AbeCHJVq (ORCPT ); Thu, 8 Mar 2018 04:21:46 -0500 Received: from 79.184.254.228.ipv4.supernova.orange.pl (79.184.254.228) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id efcc0fdb73bb9ace; Thu, 8 Mar 2018 10:21:44 +0100 From: "Rafael J. Wysocki" To: Frederic Weisbecker Cc: Peter Zijlstra , Linux PM , Thomas Gleixner , Frederic Weisbecker , Paul McKenney , Thomas Ilsche , Doug Smythies , Rik van Riel , Aubrey Li , Mike Galbraith , LKML Subject: Re: [RFC/RFT][PATCH v2 1/6] time: tick-sched: Reorganize idle tick management code Date: Thu, 08 Mar 2018 10:22:26 +0100 Message-ID: <1938066.lrFpnYERYl@aspire.rjw.lan> In-Reply-To: <20180307231827.GA9367@lerouge> References: <2067762.1uWBf5RSRc@aspire.rjw.lan> <4136227.b9g9WnMbNJ@aspire.rjw.lan> <20180307231827.GA9367@lerouge> 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 Thursday, March 8, 2018 12:18:29 AM CET Frederic Weisbecker wrote: > On Tue, Mar 06, 2018 at 10:02:01AM +0100, Rafael J. Wysocki wrote: > > Index: linux-pm/kernel/time/tick-sched.c > > =================================================================== > > --- linux-pm.orig/kernel/time/tick-sched.c > > +++ linux-pm/kernel/time/tick-sched.c > > + > > +/** > > + * tick_nohz_idle_prepare - prepare for entering idle on the current CPU. > > + * > > + * Called when we start the idle loop. > > + */ > > +void tick_nohz_idle_prepare(void) > > +{ > > + struct tick_sched *ts; > > + > > + __tick_nohz_idle_prepare(); > > + > > + local_irq_disable(); > > + > > + ts = this_cpu_ptr(&tick_cpu_sched); > > + ts->inidle = 1; > > + > > + local_irq_enable(); > > +} > > Why not calling tick_nohz_start_idle() from there? This is going to > simplify the rest, you won't need to call tick_nohz_idle_go_idle() > from places that don't want to stop the tick and you can then remove > the stop_tick argument. So I guess I would then use ts->idle_entrytime as "now" in the tick_nohz_get_sleep_length() computation, right?