Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3301982pxy; Sun, 25 Apr 2021 20:59:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdHY4c1WAJ6N37ksH2R7k20ni3Do/MTkO6QvRp0reHQDy3VVoGtikPHI2Um0aBejX2jAaY X-Received: by 2002:a17:906:b251:: with SMTP id ce17mr16635039ejb.333.1619409593755; Sun, 25 Apr 2021 20:59:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619409593; cv=none; d=google.com; s=arc-20160816; b=GSrAAuBwyYlezj5F1XawVv++rxQQLc70tOSCs+4g1C9in72gioU9gyHtApPwIbv4r4 qxAZKg3uIMv/iigw4UoJLPin6YqFM4Prqg1L3zprA1GhCUBR9VsXv9tXEUB4mY2UjUVc 3hHbDivT35FPSQUeMes1e4WPSKCD+7BmXnmttmAh/A3w/iCCDJO6rLw0ixpfTlqMKfDP Qr65bc252nfhp1ZeQZAKWbiknkBc5KCInXugWnSmN2gUzk/Z8FbNNi7ywYnKl4Jr2Ych 2SUQyG2x0sKjBHRlZIS5DXM/jFUVXNmW14XviOPs9lvWnvnDwZgD47Ov9/EqPzlZCR2P tAsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=pJcHx53fOQrfY4fDIgr3iDfc0pRFuBpk9u0pstUbVcA=; b=tNH2ktlg2yppyoSM26N4Jo8MiDGBb/9Y3ZPGLGFRlpbf0/6YQnUdiTolK1HqJZeISD sFbr40rMU8jqh0yyjzUAraAc0UprmFvdZx2Vj7lpm6v0oJNFROJAj5AdiwaRumc8bdh+ 2odUfapqOrVbZL2lkhTyZcKZn3cKvOH6EhVC9mGU5I8FQegmVH90kUwVi2vWJoE+3lqS wmvJUxzHf2P2e/qzYzjVTYTw9WTQY+jo8Z17wb84GahGhxUKGvZWQIK77DKyagqn0XG0 DZsOutbC1mRBGtcsknUTJGo6TrJBNxmUrtPFDAFJNVC/Ass7Q+gdmmpUkLJODpitE2SM e1Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=To8l842E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si13486422edi.0.2021.04.25.20.59.30; Sun, 25 Apr 2021 20:59:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=To8l842E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231547AbhDZD7N (ORCPT + 99 others); Sun, 25 Apr 2021 23:59:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbhDZD7M (ORCPT ); Sun, 25 Apr 2021 23:59:12 -0400 Received: from mail-oo1-xc2c.google.com (mail-oo1-xc2c.google.com [IPv6:2607:f8b0:4864:20::c2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58AC8C061574; Sun, 25 Apr 2021 20:58:30 -0700 (PDT) Received: by mail-oo1-xc2c.google.com with SMTP id i9-20020a4ad0890000b02901efee2118aaso4412946oor.7; Sun, 25 Apr 2021 20:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pJcHx53fOQrfY4fDIgr3iDfc0pRFuBpk9u0pstUbVcA=; b=To8l842Eif8GnCvJUhRl/NcIAGlyF31OXHNcSyAAKMqRnTS9bOepC/WugSK4omsUyx YyoHe3n+D00f65VvXQ1ZdlCRJpQPqdmsq/4u5F+2fk6HJb6/Ut794+ki1Dme0GQcP3s4 66yZ6VleZ1g62OCD1sKSdo0d8i1lT0viu+KhKV1nP5hZ5H7R13fOMvNkJuLkwrMj92wg QYfaiYtyCo2IF2yQ5f3o41wMNtMTzJjhoktM8pAfg9AnT6gIy0T3l+jC3QhTn2NHv9WH rvFy4yZvCmdjyhFTqVUTr1Bv2kjqWyXYZFU9gHGBj0CxrW2HrRbpKM3vupznZVz0n4d0 dBxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pJcHx53fOQrfY4fDIgr3iDfc0pRFuBpk9u0pstUbVcA=; b=P0kG7ld7znVYBXeAVJnCOnxeGOvRS2MkyHKjHFz6pt2H3qgfzuDVjuN6UhsLHbZjoX At7fTI2tb9kvp8bzRFGHHDxivhNoBdvmpzHCbsgojHR6qPeKlGp1MKh7/bEa72DF+wCw CSzCqYQqXHXVE1Zu/d/Ud+klNnz4XKFox+7Iv57ulclOJbeMK6I9Yml95nOaUU23Md77 2beSRMGhjyLGOnAgedGVGuyR7ngE0wZR94E/BZGblP3RwDEk3tNdcvgJOZy1QT/EFM81 V0CNfFybEkqdheFUTVcXXOfN2Lf1uaK81BE85Olx6yd+rD2FmUIDIFSD7BJx4L/pEuSO ahyw== X-Gm-Message-State: AOAM533J8j/llukMgOyxhRsTMTqrR33oVAfp7MZY/Q83FkapKQLImwK/ 2kRossCA2LcPhRqtiHye9L7OS30Hl8InCxFMwtw= X-Received: by 2002:a4a:a223:: with SMTP id m35mr11588461ool.39.1619409509623; Sun, 25 Apr 2021 20:58:29 -0700 (PDT) MIME-Version: 1.0 References: <20210426031858.12003-1-kentaishiguro@sslab.ics.keio.ac.jp> In-Reply-To: <20210426031858.12003-1-kentaishiguro@sslab.ics.keio.ac.jp> From: Wanpeng Li Date: Mon, 26 Apr 2021 11:58:19 +0800 Message-ID: Subject: Re: [RFC PATCH 0/2] Mitigating Excessive Pause-Loop Exiting in VM-Agnostic KVM To: Kenta Ishiguro Cc: David Hildenbrand , Jim Mattson , Joerg Roedel , =?UTF-8?B?5rKz6YeO5YGl5LqM?= , kvm , LKML , Paolo Bonzini , Pierre-Louis Aublin , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Apr 2021 at 11:19, Kenta Ishiguro wrote: > > Thank you for the reply. > > My question is about following scenario: > 1. running vCPU receives IPI and the vCPU's ipi_received gets true > 2. the vCPU responds to the IPI > 3. the vCPU exits > 4. the vCPU is preempted by KVM > 5. the vCPU is boosted, but it has already responded to the IPI > 6. the vCPU enters and the vCPU's ipi_received is cleaned > > In this case, I think the check of vcpu->preempted does not limit the candidate vCPUs. Good point, you are right. However, actually I played with that code a bit before, I have another version adding the vcpu->preempted checking when marking IPI receiver, the score is not as good as expected. Wanpeng