Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp907344pxf; Wed, 7 Apr 2021 14:45:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwvuC+3bQaYHJeXaZhGE/NMQ95wHdaOempE2OYnvReW5UNL8wWeC83MNEWfh1mkUVTsjGY0 X-Received: by 2002:a05:6402:212:: with SMTP id t18mr7055578edv.165.1617831902867; Wed, 07 Apr 2021 14:45:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617831902; cv=none; d=google.com; s=arc-20160816; b=Hov0/UJnTiGpykYTizToycUDrapnkp60BIABawtjpJDHl+qD8DhAwTId0AM0sd+1JN iQq4bBrWpptMUViXzDBfqmBSQWUylqEeMV+cP2txLtJI0/EyyykeJrJwe7FZ2WCnlVQQ N/ZyzHNERXfSoekDrGmiYUCzHCKaiBXdBbf0da4CkPK+xc3owxSik26zNrX6ZiYr2BQ7 6gDC9eVlgYDAlBcbwN+iAcIUE/kFR896WB3nblQZXeKhczXYmzOjAc/lQ1LsBdSJgUOi EskWXquGlYFushcasrDET6mBAnIJLJcRcnzR78eGl1MF2KJ8Gk5ZAray/12hEN2fiOPY GfHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=Gwq7QKILHZwZMl3lAkpHT2dUFN4Ic/8XItG6AMkXBig=; b=vBOy63B6UmL9zFcfMibWvil6F2S+eAlYDvnbKwl+UdPGGDa3+qbX3Y51FCZtZMy05y 56XkozVg4Zlnu7mF507B5SjDRNlyatFZVqH85L+B5hlKsU0HhxZbFHyLtwOYIOB3RQdV dB/0gwGg99S0BVkkMc1h2RLvdwmrnnTY3+A7G343nLItPRlnwxKG03dIoqtQAAAwuKii LMNwJYpWLuwOzTlfAE5samag6VmIPFaJbkpHJt9nMiEY6bJAPzCaw4KLQIkd4BQujOAI LC8S1Pyxt+uOOK/7lGMlFiWt6FuDlJ6KU4YXCs3g6LPF0LvvLQucQka2GZngmcnComdq pGyg== ARC-Authentication-Results: i=1; mx.google.com; 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 bg8si15378492ejb.592.2021.04.07.14.44.39; Wed, 07 Apr 2021 14:45:02 -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; 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 S235746AbhDGRZC (ORCPT + 99 others); Wed, 7 Apr 2021 13:25:02 -0400 Received: from mail-oo1-f53.google.com ([209.85.161.53]:42782 "EHLO mail-oo1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbhDGRZC (ORCPT ); Wed, 7 Apr 2021 13:25:02 -0400 Received: by mail-oo1-f53.google.com with SMTP id h3-20020a4ae8c30000b02901b68b39e2d3so4713771ooe.9; Wed, 07 Apr 2021 10:24:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Gwq7QKILHZwZMl3lAkpHT2dUFN4Ic/8XItG6AMkXBig=; b=UDOHBrGqLtmupoO+qC4cAmVD5EiL++7al7wRFfpjE8u8XEnXm7VkTn1UuA1DSKDpnU 4+s5Vy4tgCRarAvQosAHPZ5vmumbkVdBSG8DG6SroYcOF77yRsjKACLqqVVRDycrwTRR 4OmCq5tGzQ3SjYUtd6+5cTYkRzech55M1/mutMBP1DAgaPI+J7Ptoheo7N2vtd9ZwkGx 4Cn6EUdBX18E7QYWYSk6yeUblCRji9V3fbJoQqTa5zY9mGCfgmOqcSL3OprXx1tAs0G8 AzFi+9E5YzdvfoUVNe/CNA0tKZUatwAbk3PyFT2rXmfenRGBR0xJky4dVHQ+hyATVP6c 8ToQ== X-Gm-Message-State: AOAM531HEcsgm2d4dozHnqATaUVIGr14lYum+TrnXWUN0w1cK+/cHfBn H1grISOb6ATmuHRRbkxF6h3EABy77BeIMJXj++zT4XDf X-Received: by 2002:a4a:41cb:: with SMTP id x194mr3910804ooa.1.1617816290754; Wed, 07 Apr 2021 10:24:50 -0700 (PDT) MIME-Version: 1.0 References: <2764850.e9J7NaK4W3@kreacher> In-Reply-To: <2764850.e9J7NaK4W3@kreacher> From: "Rafael J. Wysocki" Date: Wed, 7 Apr 2021 19:24:39 +0200 Message-ID: Subject: Re: [PATCH v1 0/5] cpuidle: Take possible negative "sleep length" values into account To: "Rafael J. Wysocki" Cc: Linux PM , LKML , Frederic Weisbecker , Peter Zijlstra , Thomas Gleixner , "Zhou Ti (x2019cwm)" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 29, 2021 at 8:38 PM Rafael J. Wysocki wrote: > > Hi All, > > As follows from the discussion triggered by the patch at > > https://lore.kernel.org/lkml/20210311123708.23501-2-frederic@kernel.org/ > > the cpuidle governors using tick_nohz_get_sleep_length() assume it to always > return positive values which is not correct in general. > > To address this issues, first document the fact that negative values can > be returned by tick_nohz_get_sleep_length() (patch [1/5]). Then, in > preparation for more substantial changes, change the data type of two > fields in struct cpuidle_state to s64 so they can be used in computations > involving negative numbers safely (patch [2/5]). > > Next, adjust the teo governor a bit so that negative "sleep length" values > are counted like zero by it (patch [3/5]) and modify it so as to avoid > mishandling negative "sleep length" values (patch [4/5]). > > Finally, make the menu governor take negative "sleep length" values into > account properly (patch [5/5]). > > Please see the changelogs of the patches for details. Given no objections or concerns regarding this lot, let me queue it up. Thanks!