From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 093F1C433B4 for ; Wed, 7 Apr 2021 17:24:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF77E6121E for ; Wed, 7 Apr 2021 17:24:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235812AbhDGRZC (ORCPT ); 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-Google-Smtp-Source: ABdhPJx3AeN5QPh0GiZbfCMbGItUQ9h4R9SVloYUH4SkJOcnreLOUZrn3q0pLCLGee21BzVGrCc9rKcbCHy+/hn1Smk= 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!