Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp373857pxf; Thu, 25 Mar 2021 06:15:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXSiG4DF2DPS+g0PrrIG8kO3UvEohv4z3HvxzdrOtEnz7JHMmGzBA2HIxo6bsYANW7LW5b X-Received: by 2002:a1c:5f89:: with SMTP id t131mr7693590wmb.173.1616678140892; Thu, 25 Mar 2021 06:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616678140; cv=none; d=google.com; s=arc-20160816; b=eAVavuYU+/atVFBvXKm50N104FQpaMDeGnDMN46uBOrjgrk0hLEnVjecYRIlJex0f8 hI8Ou+YjetNMZzXP14+gG2KmxyniujH5hedvR9HmbJpRMPQwMUnGIYjITOhviNynoEmB x35ReYo72B6Qoncvfu/vXgS473o/JNpA8s8LDioRn+crNU5mqUhIfEMctcbBxtLAvsiQ EltQfdKd7Xeilj0ZY7CCn7LaETay+RIwYL3LA4RsXj7eA96Kz90iRm8YRqo8san0+KPA 4SLW+2wH95e3pZfqeMjPDzIQhVsOlhC+3s7wO/3+hu9RjHnHOjfPkEyyYaUm+q1VQMoB 0XdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Y1Rg5YBDRsRupPWL1QolKzKDrfgPP+t3tin3fDVz4+8=; b=SzBXbhseM3wIS8zNsQoGYLIzPelAgNxSD4svp1DZB/gErQokT8mVirQiX9zY5Fu4ao j90Z2XAQzdRO4CSrzegELTQomOlRfGS25AxmC85T9/MUNzicXd8+7Lt3C68PSehCIjxu Pg2N0533X01l8b79CHElvWiqGBPObYKk2xEkc437QrnY4vPmQBbRiEAf4htAI8TjRPNv lf6oLSOAZ6HCD+IsdshrBx+Bfmcpap6GNUOEUUG8mOLucpCFeZT3VEnzAgs/svUmQW6W qGby12KVdoF6ws4Woqxp8w3s2xFKRxUCOwy8lv6vTA5vLH/hRbSlYx45c/c+BuQmJJkd s6CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nBudAbRu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si5271722edd.479.2021.03.25.06.15.16; Thu, 25 Mar 2021 06:15:40 -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=pass header.i=@kernel.org header.s=k20201202 header.b=nBudAbRu; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbhCYNOH (ORCPT + 99 others); Thu, 25 Mar 2021 09:14:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:52858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbhCYNOD (ORCPT ); Thu, 25 Mar 2021 09:14:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6AA9F61601; Thu, 25 Mar 2021 13:14:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616678042; bh=Y1Rg5YBDRsRupPWL1QolKzKDrfgPP+t3tin3fDVz4+8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nBudAbRuRhBm/4kJSsGwrhP/0kYTdiMBeYbhkO0p+Xqm2vIFgTz0fOFgIJb5Riqed 0Z4rliaoXf5g7sqzQ1QQBhnK6L3syEzRQlzO3uqKIDzLY6NThuK2IrYY85e8uwSfLN CJurSHPsPxLQJi1WqNe7Fv/B+Ru81zpq5W0qIjzsZ0lv54a6JqREAHJp+yBKVwbaTW 0RK7kVV1h7vzvOIeP89PerAaePazYIRt1WyPrq2T06p+o4V3NW+CAUIt+zkyLmll0N XZ33VWp2T9mQeHhnAtnOsxibYDC5GvIElC9K4V13gkzErxaQ8o9QPGnSmnyUXTqS1l ApvwayYijIOZQ== Date: Thu, 25 Mar 2021 14:14:00 +0100 From: Frederic Weisbecker To: "Zhou Ti (x2019cwm)" Cc: "Rafael J. Wysocki" , Peter Zijlstra , Thomas Gleixner , LKML , Yunfeng Ye , "Paul E . McKenney" , Marcelo Tosatti , Ingo Molnar , "rafael@kernel.org" Subject: Re: =?utf-8?B?5Zue5aSNOiBbUEFUQ0ggMDEvMTBd?= =?utf-8?Q?_tick=2Fnohz=3A_Preven?= =?utf-8?Q?t?= tick_nohz_get_sleep_length() from returning negative value Message-ID: <20210325131400.GA938586@lothringen> References: <20210311123708.23501-1-frederic@kernel.org> <20210311123708.23501-2-frederic@kernel.org> <20210316133703.GC639918@lothringen> <20210316145352.GE639918@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 04:08:08PM +0000, Zhou Ti (x2019cwm) wrote: > But I don't think it's a good idea to handle this in callers, because logically the function shouldn't return negative values. Returning 0 directly would allow idle governors to get another chance to select again. Hmm, I'm going to leave the last word to Rafael since cpuidle are the only callers of this. In any case we need to fix it. Thanks.