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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EB3C3D2169C for ; Tue, 15 Oct 2024 12:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0KxlKe1cZvB0dkB7xJ+k2Yy5+011AMHUnvWHjCMLMeI=; b=omcTfTBVVn0TqdmtCrzPwNkAri 7Zde/SXHCH/nxtq/LR8xRAcCrMMZN1kod4f+v7oQmuDilssJSWL9+LH1f3KMqLJHj4VWRYkFyS5gS aLGHfjShws65DFQRvjt6Lrs3QprV8cp0gx1/gLoQgMp4nnQ476TdKgPYkzIrnkHizESFDKjRKBbM/ 2FcqXWUNO8FW8+DStRHYZGUVWBF0eN9DL0mvPgKq7F5SQ1+gvBq6xqkKu1DGV6JoWZUmazRRHt1Nz rwPawQQcRYQqtWett2LG+wueaF0GB2nfAiYEQYdiP2rwiHsCEgHs5VaPkTH6Nzq3PRNO+TOWEehnr 4yTlDhrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t0gy2-00000008Ed5-3omD; Tue, 15 Oct 2024 12:48:02 +0000 Received: from nyc.source.kernel.org ([2604:1380:45d1:ec00::3]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t0gnP-00000008Bk9-2BNw for linux-arm-kernel@lists.infradead.org; Tue, 15 Oct 2024 12:37:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 6DC03A42608; Tue, 15 Oct 2024 12:36:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06B9BC4CEC6; Tue, 15 Oct 2024 12:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728995822; bh=3xY3hfcRWr6Ylg7ojVLDvQmHojwLA7BHcTJWc1fwP2w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=UYhWLkIRdJ/jMJ38Sja9hZVy0vFI1xYl7QgS3djQO4j1hYlbYNMr1GXoqpNEFUiQA DIHdTOCUJFOd/xGZbjtAhVrheZFXTRnBzj0Wgk2d/Ef6W4lmsjsuokxJREGOs5p+wW qhu/bGrdsXITi+U4DzxBhX8dgFbtWi7PeAIxbHgwHN+zf3XhGhaQkN3d+a9PY+HtaV hhyhYsBTkh2J1hLsgzjovPPbTKnv2yrwDzoj8/3mIorPJHuf6BRF5+GuGQAWuJxaOn 3e2At4/mQJ+EjiqHDxzp3DWFdzrafzyw0/q3dCHIr8jeKwdkBFwlb8fke/B/SxzSHI 28tsCOxBRJgCA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1t0gnL-003iTc-Av; Tue, 15 Oct 2024 13:36:59 +0100 Date: Tue, 15 Oct 2024 13:36:58 +0100 Message-ID: <8634kx5yqd.wl-maz@kernel.org> From: Marc Zyngier To: Ankur Arora Cc: linux-pm@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, wanpengli@tencent.com, vkuznets@redhat.com, rafael@kernel.org, daniel.lezcano@linaro.org, peterz@infradead.org, arnd@arndb.de, lenb@kernel.org, mark.rutland@arm.com, harisokn@amazon.com, mtosatti@redhat.com, sudeep.holla@arm.com, cl@gentwo.org, misono.tomohiro@fujitsu.com, maobibo@loongson.cn, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Subject: Re: [PATCH v8 00/11] Enable haltpoll on arm64 In-Reply-To: <20240925232425.2763385-1-ankur.a.arora@oracle.com> References: <20240925232425.2763385-1-ankur.a.arora@oracle.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: ankur.a.arora@oracle.com, linux-pm@vger.kernel.org, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, wanpengli@tencent.com, vkuznets@redhat.com, rafael@kernel.org, daniel.lezcano@linaro.org, peterz@infradead.org, arnd@arndb.de, lenb@kernel.org, mark.rutland@arm.com, harisokn@amazon.com, mtosatti@redhat.com, sudeep.holla@arm.com, cl@gentwo.org, misono.tomohiro@fujitsu.com, maobibo@loongson.cn, joao.m.martins@oracle.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241015_053703_825872_3CB60253 X-CRM114-Status: GOOD ( 15.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 26 Sep 2024 00:24:14 +0100, Ankur Arora wrote: > > This patchset enables the cpuidle-haltpoll driver and its namesake > governor on arm64. This is specifically interesting for KVM guests by > reducing IPC latencies. > > Comparing idle switching latencies on an arm64 KVM guest with > perf bench sched pipe: > > usecs/op %stdev > > no haltpoll (baseline) 13.48 +- 5.19% > with haltpoll 6.84 +- 22.07% > > > No change in performance for a similar test on x86: > > usecs/op %stdev > > haltpoll w/ cpu_relax() (baseline) 4.75 +- 1.76% > haltpoll w/ smp_cond_load_relaxed() 4.78 +- 2.31% > > Both sets of tests were on otherwise idle systems with guest VCPUs > pinned to specific PCPUs. One reason for the higher stdev on arm64 > is that trapping of the WFE instruction by the host KVM is contingent > on the number of tasks on the runqueue. Sorry to state the obvious, but if that's the variable trapping of WFI/WFE is the cause of your trouble, why don't you simply turn it off (see 0b5afe05377d for the details)? Given that you pin your vcpus to physical CPUs, there is no need for any trapping. M. -- Without deviation from the norm, progress is not possible.