Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp147780pxk; Wed, 16 Sep 2020 00:06:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWopA0J/i2KHKWWipvFUbnoNRIznYTHtYysYE+rOT4uDGSs98F9y1BO6hXnefDK23Y0tte X-Received: by 2002:aa7:ce97:: with SMTP id y23mr26937667edv.128.1600239982536; Wed, 16 Sep 2020 00:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600239982; cv=none; d=google.com; s=arc-20160816; b=hfqsFmVrpBJUHEH2zFIvwAZaW/CqogLwyWYEVTtWn/SGlMmxJo1PKx5v+29c9Uu4zf uKXA5FTab7Hj5Z9VoqbSI9DBR8k2l7uLg/OPWQjUvCIR9HNTlfoeoYP92wj93TBIzsKs tdLMfCKbicCNBeCd9r+9jGauIpXFumbhlapDWKm/I5v/PVHF3CfEfZ/FjaeA8MUOve7g c4zUgltOHAoWGrFueabsM15H9wrF8rz2xrNbp7+LW422YTd+EgyTN5xH0Cnp/2Onzz/B ZQAdIazvhvWOAI5gxHN21+WwqZYiKqqOVrFdIYY03c86KBuXSJDkwf/Z2qvbaTdJfmjM FXWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=IHxIJboPOBlM3i4X6YeweeoVM0itEi+rMTIvtKb+e8I=; b=JCnmYTJFhoLo77HT+0EIErN6g0/v00B6lwUVFegNw2ySHijnf1LHCDAjmEo8iZRSER XPC1QFG8XQ0ai9GV1guvU07O3+0GCPEUC2fQlOQw6u8kr8UBWSrJgUWnhCRpMhEQPZBS car3drxlFIYC22wbDZCzXZDRl7wQxXopKl/HmLgn2SgUXQPGlT/supC8qcyQuJqR0HLp 2BO7fgSUcMH2YD/n6F0s+/HkcBVFwezXyO//rX6mLyDQp5TrXdp3q+MP+PZnraAeLn4x Q6sqAWR3At1uSPCVm2SQdyNqpunefG9T46gdFlKuM6MSR57PKmosmaFhG6IIHhSvX5oF HqqA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z18si10957209ejr.232.2020.09.16.00.05.59; Wed, 16 Sep 2020 00:06:22 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726360AbgIPHEl convert rfc822-to-8bit (ORCPT + 99 others); Wed, 16 Sep 2020 03:04:41 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:3605 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726234AbgIPHEf (ORCPT ); Wed, 16 Sep 2020 03:04:35 -0400 Received: from dggemi402-hub.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 56F863036FD63F611675; Wed, 16 Sep 2020 15:04:31 +0800 (CST) Received: from DGGEMI424-HUB.china.huawei.com (10.1.199.153) by dggemi402-hub.china.huawei.com (10.3.17.135) with Microsoft SMTP Server (TLS) id 14.3.487.0; Wed, 16 Sep 2020 15:04:30 +0800 Received: from DGGEMI522-MBS.china.huawei.com ([169.254.8.78]) by DGGEMI424-HUB.china.huawei.com ([10.1.199.153]) with mapi id 14.03.0487.000; Wed, 16 Sep 2020 15:04:24 +0800 From: lushenming To: Marc Zyngier CC: Thomas Gleixner , Jason Cooper , "linux-kernel@vger.kernel.org" , "Wanghaibin (D)" , yuzenghui Subject: RE: [PATCH] irqchip/gic-v4.1: Optimize the delay time of the poll on the GICR_VPENDBASER.Dirty bit Thread-Topic: [PATCH] irqchip/gic-v4.1: Optimize the delay time of the poll on the GICR_VPENDBASER.Dirty bit Thread-Index: AdaLYvuHeQKSQv5lQ9G9IAytgjmwLv//klKA//55OFA= Date: Wed, 16 Sep 2020 07:04:24 +0000 Message-ID: <343E0E168479F04FACCB176989D12DE7EE3206@dggemi522-mbs.china.huawei.com> References: <343E0E168479F04FACCB176989D12DE7EE1D2D@dggemi522-mbs.china.huawei.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.174.184.59] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Our team just discussed this issue again and consulted our GIC hardware design team. They think the RD can afford busy waiting. So we still think maybe 0 is better, at least for our hardware. In addition, if not 0, as I said before, in our measurement, it takes only hundreds of nanoseconds, or 1~2 microseconds, to finish parsing the VPT in most cases. So maybe 1 microseconds, or smaller, is more appropriate. Anyway, 10 microseconds is too much. But it has to be said that it does depend on the hardware implementation. Besides, I'm not sure where are the start and end point of the total scheduling latency of a vcpu you said, which includes many events. Is the parse time of the VPT not clear enough? -----Original Message----- From: Marc Zyngier [mailto:maz@kernel.org] Sent: 2020-09-15 22:48 To: lushenming Cc: Thomas Gleixner ; Jason Cooper ; linux-kernel@vger.kernel.org; Wanghaibin (D) ; yuzenghui Subject: Re: [PATCH] irqchip/gic-v4.1: Optimize the delay time of the poll on the GICR_VPENDBASER.Dirty bit On 2020-09-15 15:04, lushenming wrote: > Thanks for your quick response. > > Okay, I agree that busy-waiting may add more overhead at the RD level. > But I think that the delay time can be adjusted. In our latest > hardware implementation, we optimize the search of the VPT, now even > the VPT full of interrupts (56k) can be parsed within 2 microseconds. It's not so much when the VPT is full that it is bad. It is when the pending interrupts are not cached, and that you don't know *where* to look for them in the VPT. > It is true that the parse speeds of various hardware are different, > but does directly waiting for 10 microseconds make the optimization of > those fast hardware be completely masked? Maybe we can set the delay > time smaller, like 1 microseconds? That certainly would be more acceptable. But I still question the impact of such a change compared to the cost of a vcpu entry. I suggest you come up with measurements that actually show that polling this register more often significantly reduces the entry latency. Only then can we make an educated decision. Thanks, M. -- Jazz is not dead. It just smells funny...