Received: by 2002:a05:7412:e79e:b0:f3:1519:9f41 with SMTP id o30csp185788rdd; Wed, 22 Nov 2023 12:51:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IHvc9MxRpMDD0GwdjeoK48bZYEx1IiFBjCI7N6ZJUYpG7m4c8AkG8wAI/onJ9QgfRHxiZNw X-Received: by 2002:a05:6a00:429b:b0:6c6:b5ae:15a4 with SMTP id bx27-20020a056a00429b00b006c6b5ae15a4mr4249689pfb.20.1700686295777; Wed, 22 Nov 2023 12:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700686295; cv=none; d=google.com; s=arc-20160816; b=CujXVw/QhhsBjME72zbIp/F4j17uZvhiweo+CSaRuKZvQj4MZbOCPAPLhNZUc5a9kV zcUM1BVcAADNac+/ugIPWStYGOmM+UqiQxRPEQscXRyT6xK1NELS+pqH42lQgouX7Tzo 7enjsmcmfxT2FgGzJ6oXYQS3cijnYTE0LTCOZ4Z25pvXckdQel8zZy8E3CLaXtaDiYDe k8NMF/wbXG7Xecm/6EGqzvuB2OR8nFNzd4GvPecoPtFqKjoDPLqhK+OE8R0D7JWn/Bb2 ex+xS0AK8L8gQpfIpd1IkSn8C7QYXBAMrOFTgxxpz8kX4/tKyplYXbv4+WCqFncXu6R2 AUTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date; bh=vLM1kxAsgEanzw2YG0byEYn+jVrLuUPvOB/m/WRptk4=; fh=rIOhpPtacfXIMcaC4wmpIylW1Ssa0orbfnySoaOagVc=; b=UrxlES2iE9fv5HlCatcLUXpN0EJevJdvc/4EmLIuPBN90fybAJbLsRs5C2UKHcOK9l 90sCabFMtFNb0MdFOtzAdvw0ryLgn8+/t9EFhhY3cxdFTWaO1MaYM/s0t3B/Q0c/iAeC 6vGmbljnPOTD/+57HL8RuFOr6Xdwgt6A6XIWiwOb9FyelR/aeG1L29y7bXLlUmohOVB7 sVtbm+rGQGp7xab5qn7aHzqqw+F3oFHxF+uZQmDLgI7XRbpvW6HC1Uny4xBgkRJo+bjH EoBkHlwa6GblD8tRYURLxuer+jE1NG4x3YhrzDG0+vmCjLA+Sq/PjXLSg4bl2zx2dgtI c99Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id h6-20020a63df46000000b0056513361b4fsi192521pgj.741.2023.11.22.12.51.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 12:51:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 7708081E9C81; Wed, 22 Nov 2023 12:51:33 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbjKVUvY (ORCPT + 99 others); Wed, 22 Nov 2023 15:51:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230377AbjKVUvX (ORCPT ); Wed, 22 Nov 2023 15:51:23 -0500 Received: from gentwo.org (gentwo.org [IPv6:2a02:4780:10:3cd9::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA268112; Wed, 22 Nov 2023 12:51:19 -0800 (PST) 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 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 12:51:33 -0800 (PST) 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().