Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1375833img; Tue, 19 Mar 2019 06:26:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqynD5K42jk78AQUeoxursegxeVlF46fAGnP9Hr/9B2IotD3yptyfcLhg5egisRlrfTP69gq X-Received: by 2002:a65:5a81:: with SMTP id c1mr1825436pgt.217.1553002017170; Tue, 19 Mar 2019 06:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553002017; cv=none; d=google.com; s=arc-20160816; b=IDVeUZU/qEleKNT+vuZlKoTiodMa+wBHgbbEz6SYc3y4Jp4/RSOxRe8dKElM9wf0Ki vt9R9dMl1euadYtlm3tWmxvlR+Hxq42SChPOssdWZsJknE++z8frGXSDHZE11U8ZptJ2 saR4xm2UsqY1cEBn3lUj/QePpDGiu2t+mY9cAaC/fy4jItORlEhlXbmieLbQEQUPTekG G55SLATpEOBPRnC5aZBM7tE4UGbwvVDDh9JE874kW6F6tDTn+Ux9ad+Jhb3D2735EIjB I75DhWA0XhWSanMxfrp8kbxaK/UrKDJsXRmL4Y2y1/xLsuQVWbHEi3MxLJJCzGyOBqC0 1H2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:date:message-id:cc:subject:from:to; bh=DOyDJbhC2uAcRdrlqbcD4XsVgaWugd6wZUL3YBATPMs=; b=SaDszG9f9FGp1RoWl6Yblo718OLMJy5LUW9Us5ZUU5Ulyl+keM0eqm8TBqCBZdWWso PLju8A2QK0yef2SAXyzPheQ2OXgeSpPHhR8kSjcqpLhsZ1uDqea281hQZNVS9h+wpMOS WrE+MFLecrSzJIZ5DxBN30AOjnut9WQvB9HON3KL2rRNl5hl/FXnzjqGoRjCZyAwN/19 fzWx9nJLJVYHJJQkLJpIPlcr8CN1sKur54HLbmh7JSsr3KiYXa13BAsJdkQdp4yVwXX+ MBEdGsfPNkITMOnCrMIfL5QMa4kUmPWRJ7BcH2z+X/bufOPIVmOnSVoSTIr2FcC9ZleY 6Xlg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f32si11191095plf.24.2019.03.19.06.26.41; Tue, 19 Mar 2019 06:26:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbfCSN0D (ORCPT + 99 others); Tue, 19 Mar 2019 09:26:03 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4709 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725951AbfCSN0C (ORCPT ); Tue, 19 Mar 2019 09:26:02 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id E07F94C5F12FDEC5882E; Tue, 19 Mar 2019 21:25:56 +0800 (CST) Received: from [127.0.0.1] (10.57.56.75) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Tue, 19 Mar 2019 21:25:47 +0800 To: , , , Linuxarm From: "Tangnianyao (ICT)" Subject: [RFC] Question about enable doorbell irq and halt_poll process CC: , Message-ID: <0fb3c9ba-8428-ea6c-2973-952624f601cc@huawei.com> Date: Tue, 19 Mar 2019 21:25:47 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.57.56.75] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, all Using gicv4, when guest is waiting for irq, it sends wfi and traps to kvm. When vlpi is forwarded to PE after its_vpe_deschedule, before halt_poll in kvm_vcpu_block, halt_poll may increase latency for this vlpi getting to guest. In halt_poll process, it checks if there's pending irq for vcpu using pending_last. However, doorbell is not enable at this moment and vlpi or doorbell can not set pending_last true, to stop halt_poll. It will run until halt_poll time ends, if there's no other physical irq coming in the meantime. And then vcpu is scheduled out. This pending vlpi has to wait for vcpu getting schedule in next time. Should we enable doorbell before halt_poll process ?