Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3022128rwb; Mon, 16 Jan 2023 02:39:24 -0800 (PST) X-Google-Smtp-Source: AMrXdXuvWRCjocIIxYf57Cb6gbXNF+F3yqUBGslRXoOLtxEnr5dBnD/TYsivHhET+5NFPRMzmdCN X-Received: by 2002:a17:907:9705:b0:870:8e22:1433 with SMTP id jg5-20020a170907970500b008708e221433mr4110629ejc.16.1673865564046; Mon, 16 Jan 2023 02:39:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673865564; cv=none; d=google.com; s=arc-20160816; b=q8wkSPN3hbAhj78pafAxHlfb8+nt/HLboag0vlCEUFuBgDpYv0zX7Vcz1rX/bvoY7y 4xPwXz5BQlhsD8ePB4hpxr8Anrhfw+nxFtFQqGBmmJRrRsKsZXUlora/IoV+Ho6IIVfa DC+HUH5oF9UTcRmv9EmpdQ9EH5R/7bdljaVAMYmz/IPcYaoWtlq2i0nuE0/sPuKGK8uM 1PDJW8nKmiWa9+SDUYiqS4Pp6pNz2VTxRRsKXWEmfV0nEBW2+qADlfF/TgfXVCTORg4V BMMiLk9qrLCZRk3prODdt0eLLKssqMjwua0r377NFFh/O10P4Xi+Mo089e+7g0GuJQkY sBLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/rFp2o0Cj9FsEOSxajShVn9r9sdKegupWm1wUvYWwrw=; b=bUh283tBYRy2X9n+Ng/tCO3evmI9nJgqwdWLq2EIbOfztj7tKuBZsno06mviaabGcF l5VJCiLk4fPc95IEn6x4Bppw33Qq5Re7M6222+k53xRutBL0MYyUYiDA9F+M3ghxn/oY racPKSf/iUpPA8sxL9ShzThxrQSs2qd3QoAJPH56IUBxG5FkvBq6IBinW4Feg0nTFCx0 53DX3K9Yt9eaabLRPoa+t6ixFS/DPDGpJ3FPYbwtVvXyVR6ybYDEVnNB07qcxre2+dxF ekWk9b3uhCBczK6VuIzeahaWzpMS7Htaeu8nw0m9eeWt0oIaaO5ZwmnJioFVL+l1s26g IhLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZZDVOkxR; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg3-20020a170907320300b007c4fe4301basi29897150ejb.983.2023.01.16.02.39.10; Mon, 16 Jan 2023 02:39:24 -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=@kernel.org header.s=k20201202 header.b=ZZDVOkxR; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbjAPKNF (ORCPT + 51 others); Mon, 16 Jan 2023 05:13:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229672AbjAPKMk (ORCPT ); Mon, 16 Jan 2023 05:12:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 725D21ABD6 for ; Mon, 16 Jan 2023 02:11:51 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0F67260F3F for ; Mon, 16 Jan 2023 10:11:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 231B4C433D2; Mon, 16 Jan 2023 10:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673863910; bh=XGM2GdNthJK25Wl+CewKBCUakOt96N+q96d+FiYSESU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZZDVOkxRWSCA1ie1B0UbEfIL41FOyXxkSWqQLa8RVsoKL5QIXi+FGAUVx6n90YvBM 6uo42aI3UkhkZxmtlXAJy7MW1T2TVCZEiRWrmqax6GuYQ0LYN/rRuti/uZHh1ve10+ XZzltwQXjA23hcuK5scucioo6mc5nFQZ4FsK4bMnwFCOHakCA1MGJq+QZ7U+03dM6Q nocDSxH25sbuOyxBMAz6fkr21w3SejnKz00RKJxiS7qSdgj/61Fjz1xCt0roheNDys AxpUhrlpuFqJuU42fIrzlEmgJ7SeMvXDbBatrq/C16u8fNdN0nPC2eMmPNFp7u7id0 Gi667aufxkYZg== Message-ID: <073cf067-908f-0bdd-e3b9-e6c5a5e3c910@kernel.org> Date: Mon, 16 Jan 2023 11:11:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH] sched/idle: Make idle poll dynamic per-cpu Content-Language: en-US To: Vincent Guittot , Ingo Molnar Cc: Peter Zijlstra , 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" References: <20230112162426.217522-1-bristot@kernel.org> From: Daniel Bristot de Oliveira In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,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 1/16/23 10:51, Vincent Guittot wrote: > 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 Yep, that is a possibility, but it does not always work as expected. For example, on virtual machines the vCPU gets scheduled out, even with this option set :-/. -- Daniel > Regards > Vincent >> >> Thanks, >> >> Ingo