Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp621007img; Wed, 20 Mar 2019 07:33:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5jZf/t4nWlWodATOAmaoBBHHFjC4+y7qxFjZ13dUPgkP7GTPr8gwOIMHj7e6IYV0Af1HK X-Received: by 2002:a63:3648:: with SMTP id d69mr7741925pga.314.1553092393769; Wed, 20 Mar 2019 07:33:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553092393; cv=none; d=google.com; s=arc-20160816; b=rARKRxd6xbb/5HEbnLqokUe2zFQUqqBYE8bHtB8Mh2pKccvUIogBVfakGk4J4gX90U JmW275LOYBVfSQahZis+F72d5wrkGu4zwqAVE9p+3GIbalol/rZNGpFz7t8Rt+RapNAq C/1FPYaF2+6JjC7uPmYUni5/OkNWIiC6L3fUp0xssn9VMWb14uIVCtFozediIXJS7iC5 /pRW3rAMoAygk74Eg/SazsSGAC4mUL1VgZrxE5g4CC1CCQ1w82MKPF5b8rBDaDH81DnP PJR9fQg0mMGCUKPxN+vlOGDAZ7bzzZUcWCEo0pc/ZODJ3uRRKq80EVFewn+4/Q4B7hku 2SjQ== 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:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=YBvh+ZMJY9v0GgN85Tau8SomEDCVwVLhtczvIdCb5kU=; b=0KSLDz53T1cuhdXCJFdVYbUPTpDAGUBKhIanDeTUxzDQhu9b0S5er8aiYG6muWEuWX tICfrzyIMykie4/r9VDzP4b3U+ZqyMQFow2kbIv3lUB8AowfZTsh801plukaYdDiOPmj mXTMt47L6F1qmG7+XDPoOyD1mxitKlL/8e7hJ6IqWPCxH8xBMYJmEfFUTqvcBZtmX6qd PY+aWzMGN3ohb23YT6QdU5iMu8eBFDz8boYnS44fr/M5STpj4KbGS829WNy22ZJ9Ad94 zA69KMUm/wm+RwZE2sO8EE9G75HyS/pB4DmvsqvRKSiLAqw0wwzC3/I0LGYtpAZj8/yj jl8Q== 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 m63si1735143pfj.107.2019.03.20.07.32.57; Wed, 20 Mar 2019 07:33:13 -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 S1727102AbfCTObu (ORCPT + 99 others); Wed, 20 Mar 2019 10:31:50 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:45516 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725996AbfCTObu (ORCPT ); Wed, 20 Mar 2019 10:31:50 -0400 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DFCE6765DF5636A4B0E4; Wed, 20 Mar 2019 22:31:47 +0800 (CST) Received: from [127.0.0.1] (10.177.31.55) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Wed, 20 Mar 2019 22:31:37 +0800 Subject: Re: [RFC] Question about enable doorbell irq and halt_poll process To: "Tangnianyao (ICT)" , , , , Linuxarm References: <0fb3c9ba-8428-ea6c-2973-952624f601cc@huawei.com> CC: , Marc Zyngier , Christoffer Dall From: Heyi Guo Message-ID: Date: Wed, 20 Mar 2019 22:31:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <0fb3c9ba-8428-ea6c-2973-952624f601cc@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.55] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +cc Marc and Christoffer... On 2019/3/19 21:25, Tangnianyao (ICT) wrote: > 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 ? > > > . >