Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3022069rwb; Mon, 16 Jan 2023 02:39:21 -0800 (PST) X-Google-Smtp-Source: AMrXdXs8yeRzA6JnjcvEQjKJm5LzM+Vqwo63tG57kg3u/JVBSmdaZctZan70X1HatlODP+jWQKG+ X-Received: by 2002:a17:907:7b88:b0:84d:465f:d2fe with SMTP id ne8-20020a1709077b8800b0084d465fd2femr26912147ejc.41.1673865561740; Mon, 16 Jan 2023 02:39:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673865561; cv=none; d=google.com; s=arc-20160816; b=Uaxj3ro9xBt1Yr3vBlMv9FEP35UpwSbav/hAMe3+21FBBcuLP9x37FrW6jOG/Fp2r8 NcACSNXctChStWGdt4T7rTkLcse/rgoQ/TlSSUeyKyhiLQwFTK3G9nolvOcXM5ap8QP7 I/Ols6+KY2DwQGoVmM563LOvdYk+DSDuQA4O224RK25jbkiVZwoCZMtyA6YqFZHtLGHZ YmLG5muXzQXXZs0Z2fXmZZPRtg2Bdj4sfVskILUvRdLzKhFAHcM31TdnwrFgCWDD/6p2 eSLTQYbbXliA+x/bWK1QjvR/vmBwPQIYeQcCNWu9m6VM7jlUO8k6fkWvqLaeu4S2KNSW m2zA== 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:dkim-signature; bh=vuZtfqxiKrPezXdmrbbcOWCnjwcTnLNOwXCm2ry7AXw=; b=ouuB1IdngDfzrMdMYCDLn1/JgASeERLf79Z0yA5lCoelcRj771qCAvg1kUUBt7PNq5 7AzN2/+OLeRyd7cZrmIr8QvgQZ2NdShZg1PbIfiHCwfV9h/7oRGXX0fxsgXOyVgdlQCq z8qWqZg61YBknDBs8mZ820fiAAgmmwwXvKW7Z+HFybpQ/dhu+g51B5PZuEEMsP7UKUjU 7FofdcFv/jLEAVMqJoprPUPm711Ca0KkdEalCaJtdeH4p2h9q+azumh0mTE8r54JVx9r 52I+D+oUyO+oMYLAxHuk4C03CBGhctFHdytln9ZCva+rS+ZhAbQ/sXdnvI2s8zIJ+SEy 12Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=erlfADiX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs38-20020a1709072d2600b0085a483a6fcbsi19874036ejc.278.2023.01.16.02.39.08; Mon, 16 Jan 2023 02:39:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=erlfADiX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229673AbjAPJvt (ORCPT + 51 others); Mon, 16 Jan 2023 04:51:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbjAPJvh (ORCPT ); Mon, 16 Jan 2023 04:51:37 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A92E14EB7 for ; Mon, 16 Jan 2023 01:51:36 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id p24so29777778plw.11 for ; Mon, 16 Jan 2023 01:51:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vuZtfqxiKrPezXdmrbbcOWCnjwcTnLNOwXCm2ry7AXw=; b=erlfADiX9yeCHPk3RvZgLTufLGlx+vTaafvQTLGRMmo/xWrwLwf08aZnwp8ftSss0T jAiwq0AZV7RimT4lLJ9cns35YIyrl8LJycbDkyDrcl374FPplGag5CjldDz25nB7WS3H d8jLCSkE0SPy5nSDlZrkO6XehZKtFKP+0fL5j5sDHVxYTvkDZiT7r0Nyww5Lw1gjuYqP DdkQHeGgoymE1Vuiz9q6q5TJyH9YvuSfDg37t+PGRNNUIDrbzHXwYUHwwFzuUOs2hHKU O5TqXe9Dqfcw6gUvtSlcdpgfuuzsWAAX+v/5QorYirp56drEkbPuCQjXwRnTHJeDOg2p Hc6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vuZtfqxiKrPezXdmrbbcOWCnjwcTnLNOwXCm2ry7AXw=; b=rhkGGXlX8RCnYF1IxZyzXeow0CaLtoiUBP/GE5r3wwk/Y99jXV+o+1/UwJN5ZgH89m ZFFkShwWJ46ZeYeB448jsjOvN5wg/4BSdJt9xD3EbxBtWg2PZeuepvqO2q9Djm/PXarc qUSYESmry4tJSkWH1fkhmraEebd0ygYPW1N37ss3XwhuriAkeWRtYqT1Iv2DnPMqjRct +tMyyqHeG93G0QxiRfAScY/01FKIf6iu9c7qbQqy6Kk7HJPKtO9I64i49/lH9i3J/bjd ST+BkUFOVYRi+CUpkRGHJ/S5cUXGC9tPXA9LjNUoILODgYAO/GQsNXelJQTDNheSdWrU yJNA== X-Gm-Message-State: AFqh2kqkdsbkRxxgB5eoC81i+1pQfdDtH7n1x+v1tGTW6zbJSWMmMg1Q LnffmwZTIPhdW3zS5Bvc15UJtWl1HAhIfq+caOSlIQ== X-Received: by 2002:a17:90a:49c6:b0:227:1f55:158d with SMTP id l6-20020a17090a49c600b002271f55158dmr2367451pjm.92.1673862695756; Mon, 16 Jan 2023 01:51:35 -0800 (PST) MIME-Version: 1.0 References: <20230112162426.217522-1-bristot@kernel.org> In-Reply-To: From: Vincent Guittot Date: Mon, 16 Jan 2023 10:51:24 +0100 Message-ID: Subject: Re: [PATCH] sched/idle: Make idle poll dynamic per-cpu To: Ingo Molnar Cc: Peter Zijlstra , Daniel Bristot de Oliveira , linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Joe Mario , "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 16 Jan 2023 at 10:28, Ingo Molnar wrote: > > > * Ingo Molnar wrote: > > > > Urgh, can we please make this a cpuidle governor thing or so? So that > > > we don't need to invent new interfaces and such. > > > > I think the desired property here would be to make this interface on top > > of pretty much any governor. Ie. have a governor, but also a way to drop > > any CPU into idle-poll, overriding that. > > ... with the goal of having the best governor for power efficiency by > default - but also the ability to drop a handful of CPUs into the highest > performance / lowest latency idle mode. > > It's a special kind of nested policy, for workload exceptions. User can set per cpu latency constraint with /sys/devices/system/cpu/cpu*/power/pm_qos_resume_latency_us Which is then used by cpuidle governor when selecting an idle state. The cpuidle governor should then select the idle state that matches with the wakeup latency for those CPUs but select the most power efficient for others. Setting a low value should filter all idle states except the polling one Regards Vincent > > Thanks, > > Ingo