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 6BCB3C61D97 for ; Wed, 22 Nov 2023 20:51:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:Message-ID:In-Reply-To: Subject:cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kmMqM5INXExUzsLhPwLkvkqxMH5irs26A7SUEyaGWng=; b=kW4vD3MwFwHwItRxntShft+I0w Pt/IJdBXAU63q6lww0sLoexvjiF245jHm16U2StlZKnUZ5s7Qj+ZKBHLCEoSkduMlkTJLjiBSrmY4 X9FbB4+8vZskUP7lfKWzUgrXh9Gs5K7o1Vsc+zKrxIsD8eyPTBBGSuv5TVg0YhMvdRl8Z8LFBtrWH xofl5K8axbQ6wkrgHrNl1tDSwjr0UwF/TRGdogY/fgzA/1d9CfLnR/XsrLlUCNPmQrNj8vVoAY311 TWRG1gTXk4GOLB9iFIPi6G3apclTVgLu4Gea/o8bDQJllEyI6I1sseOn7AZ9N1AUfjhcAmUSaMQcV 8NgAfr2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r5uBz-0032wb-23; Wed, 22 Nov 2023 20:51:27 +0000 Received: from gentwo.org ([62.72.0.81]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r5uBw-0032vG-1g for linux-arm-kernel@lists.infradead.org; Wed, 22 Nov 2023 20:51:25 +0000 Received: by gentwo.org (Postfix, from userid 1003) id 75B8148F4A; Wed, 22 Nov 2023 12:51:19 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 7503D48F41; Wed, 22 Nov 2023 12:51:19 -0800 (PST) Date: Wed, 22 Nov 2023 12:51:19 -0800 (PST) From: Christoph Lameter To: Mihai Carabas cc: linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, pbonzini@redhat.com, wanpengli@tencent.com, vkuznets@redhat.com, rafael@kernel.org, daniel.lezcano@linaro.org, akpm@linux-foundation.org, pmladek@suse.com, peterz@infradead.org, dianders@chromium.org, npiggin@gmail.com, rick.p.edgecombe@intel.com, joao.m.martins@oracle.com, juerg.haefliger@canonical.com, mic@digikod.net, arnd@arndb.de, ankur.a.arora@oracle.com Subject: Re: [PATCH 7/7] cpuidle/poll_state: replace cpu_relax with smp_cond_load_relaxed In-Reply-To: <1700488898-12431-8-git-send-email-mihai.carabas@oracle.com> Message-ID: <6bd5fd43-552d-b020-1338-d89279f7a517@linux.com> References: <1700488898-12431-1-git-send-email-mihai.carabas@oracle.com> <1700488898-12431-8-git-send-email-mihai.carabas@oracle.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231122_125124_598484_6B9A2B8E X-CRM114-Status: UNSURE ( 6.24 ) X-CRM114-Notice: Please train this message. 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 20 Nov 2023, Mihai Carabas wrote: > cpu_relax on ARM64 does a simple "yield". Thus we replace it with > smp_cond_load_relaxed which basically does a "wfe". Well it clears events first (which requires the first WFE) and then does a WFE waiting for any events if no events were pending. WFE does not cause a VMEXIT? Or does the inner loop of smp_cond_load_relaxed now do 2x VMEXITS? KVM ARM64 code seems to indicate that WFE causes a VMEXIT. See kvm_handle_wfx(). _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel