Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp236502rdb; Mon, 22 Jan 2024 02:26:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnPy+pjndQmOGKR+DS6EMqekcln6TB0AMW8lSGEz1yNc5mnjSr2f9XPa/qP7qHakYsNbDF X-Received: by 2002:a05:6402:1d55:b0:55c:3bb5:2b9a with SMTP id dz21-20020a0564021d5500b0055c3bb52b9amr579784edb.23.1705919206195; Mon, 22 Jan 2024 02:26:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705919206; cv=pass; d=google.com; s=arc-20160816; b=odCcE6lrTdwGAzjZab4Wo5ZGOxccKrt6CB5K1H2U0tJ+hwAMIuykqOQQiAYqKntSDv 5LwjF77ROoUeSGyMuqEyoLMbvHu7NruErdLc5FSSpcr1s7slfAQEWPOIhnuO1/Eo7eWw lHrIBsuiw/mPrYRojKd+pWLxdqh9j8ZmkO3pzdFaYCFD/f9yCGYRcW35yqeGH1GFvg3K QYlU+uBe1TlftgtBBea52q7H2MGSt3YL+/RM7azlW6ssMGTxs171x9PTIuRyM4gFcH19 /wq3H8EPZTPYCD+f6bhvShRkGd4QkmPvzk4Sncxj6OQX4QMrkIFx3+IgLLaVi7fYnMMb q40w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=2kiOCLBd1pSzhu9KU8byjsp15x5ZyvO1qTcLxCpdJ7o=; fh=0cQSDWhBCuOopnD+vSr606fO7aTU5c3bCd1zRzevlEY=; b=MfjPVDjQ26yRrMHcqa00qR/U2C2kGeFycpVCEs+N+g0GlL3sTcC6pm3LA6Ll5T+BPO 93qVolG3xmgxZ6onBFOBg9IRcVGQKlYBzTUC0qkcXAj7AX+T4rN8oeyGfxIvhgLV8diI aADeXEtqFq2cpFjmaTjnqEozbt88vWtHeIotBFc5vVxyzXrx9r1sVeO97t67ne2GfY1W MBAsE/02jrdnXDH2Oc3Hkv32g87SFSifgYY5J60i+Tj9XRgnfxzX8OYmXmPwlrmjAo/q GMlvFtGfsbCeKnq0VX8jmozqGQI4wxkGSGjZdUNIBwKO+Lu1+JYEN0SP7y6u8k7Vd7Iv 14rQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iomb0HFD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-32741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l28-20020a50d6dc000000b0055872d13ac5si411596edj.270.2024.01.22.02.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 02:26:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-32741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iomb0HFD; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-32741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-32741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 298761F23C33 for ; Mon, 22 Jan 2024 10:26:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8863D3A1BB; Mon, 22 Jan 2024 10:23:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iomb0HFD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="+zUvxTMu" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FAF83A1AE for ; Mon, 22 Jan 2024 10:23:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705918983; cv=none; b=Mt7nXZQ3A4l0JqZx9Jl0Wu5HGeV6MzeYJfj+ewwTYy3NJRr0w3kz21bcPz2u1CtorjhdFxAM2tMWK50AoA2Vu35gQUIZ4vz1pnGJcsbcnAn7lWTkHWb/7OeCNph35Yi1AU9kh18e1hFBTO6QifIdQnAxjvpzBQdB1eYFEiKdB8k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705918983; c=relaxed/simple; bh=/HVc2sROVltDLVMFLCM0/wdEy4aZkHopgYVU2TEqX7A=; h=From:To:Cc:Subject:In-Reply-To:Date:Message-ID:MIME-Version: Content-Type; b=tOms0cs8qF63J8A2/3R8G6fqmruPyr4HtJBsrjdbhmbhLNEX743lr3CTWW93Yy2qwe8ph/o/bh+Ail/9RyCvUJzc0qwRFso/Yev0m7oVCAjrXETOMb5AnSOfTEIyyYob5gnoAyPoHOZmn6dGjQUV6Y7hSDNmuU2f3DICtBLYXOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=iomb0HFD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=+zUvxTMu; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Anna-Maria Behnsen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1705918979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=2kiOCLBd1pSzhu9KU8byjsp15x5ZyvO1qTcLxCpdJ7o=; b=iomb0HFDAKHElrRkOf3GHsUiGVBSxv8G+Dz/Xbklr2ZUBXi3OZbilSevJLfsTVH4P3L7+S r/akpIleou1eYkEgzYziFJJtMkBeS7YC0crBWRRePw61zyZQWQNjMHQmgDWhNyR10nfwLv dusiveLQMy8O2A70plJOu+k1NPX5dhLqMdDboGcTzbWYfZ84J9xHcyMkqTcrodwVChGxGq kIT4wXLABYT8CJ5JmdZJzaAox01nyhlucBPLP8fbCiS+5jkH8C4LdYgI6U8v8bm3Pvolyg CPAhqApu8/37JvDqADyv4AT6Y9iPpIiOl89l233zhc9GZIEpM69A4mOPwGlwjQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1705918979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to; bh=2kiOCLBd1pSzhu9KU8byjsp15x5ZyvO1qTcLxCpdJ7o=; b=+zUvxTMuIkjo4w290zzQAfvwg5hAGsUF2QIV1s2A+VVOWiYuNRfHcOZE+amXfF3f06LELj P0TtgV9PaIT0P9Aw== To: Pierre Gondois , Vincent Guittot Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider Subject: Re: [PATCH] sched/idle: Prevent stopping the tick when there is no cpuidle driver In-Reply-To: Date: Mon, 22 Jan 2024 11:22:59 +0100 Message-ID: <87y1chy8e4.fsf@somnus> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Hi, Pierre Gondois writes: > On 1/15/24 14:29, Vincent Guittot wrote: >> On Mon, 15 Jan 2024 at 13:40, Pierre Gondois wrote: >>> >>> Hello Thomas, >>> >>> On 1/12/24 15:52, Thomas Gleixner wrote: >>>> On Fri, Jan 12 2024 at 14:39, Pierre Gondois wrote: >>>>> On 1/12/24 11:56, Anna-Maria Behnsen wrote: >>>>>> Pierre Gondois writes: >>>>>>> I agree that the absence of cpuidle driver prevents from reaching deep >>>>>>> idle states. FWIU, there is however still benefits in stopping the tick >>>>>>> on such platform. >>>>>> >>>>>> What's the benefit? >>>>> >>>>> I did the following test: >>>>> - on an arm64 Juno-r2 platform (2 big A-72 and 4 little A-53 CPUs) >>>>> - booting with 'cpuidle.off=1' >>>>> - using the energy counters of the platforms >>>>> (the counters measure energy for the whole cluster of big/little CPUs) >>>>> - letting the platform idling during 10s >>>>> >>>>> So the energy consumption would be up: >>>>> - ~6% for the big CPUs >>>>> - ~10% for the litte CPUs >>>> >>>> Fair enough, but what's the actual usecase? >>>> >>>> NOHZ w/o cpuidle driver seems a rather academic exercise to me. >> >> Don't know if it's really a valid use case but can't we have VMs in >> such a configuration ? >> NOHZ enabled and no cpuidle driver as VM doesn't manage HW anyway ? > > Yes right, > I tried with a kvmtool generated VM and it seemed to be the case: > > $ grep . /sys/devices/system/cpu/cpuidle/* > /sys/devices/system/cpu/cpuidle/available_governors:menu > /sys/devices/system/cpu/cpuidle/current_driver:none > /sys/devices/system/cpu/cpuidle/current_governor:menu > /sys/devices/system/cpu/cpuidle/current_governor_ro:menu > So it's not on me to decide whether it is valid to skip stopping the tick in this setting or not. I observed this unconditional call (which is not for free) on a fully loaded system which decreases performance. If there is a reasonable condition that could be added for stopping the tick, this might also be a good solution or even a better solution. But only checking whether cpuidle driver is available or not and then unconditionally stopping the tick, doesn't make sense IMHO. Thanks, Anna-Maria