Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp4489275imc; Mon, 25 Feb 2019 05:56:27 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia50zilWPh7WCSUZqjU43ga2/XdxhAQQQmUhAxPWbIU+Q4EO55N2DBwYiHSexJs3uqgB97r X-Received: by 2002:a63:5362:: with SMTP id t34mr18789811pgl.81.1551102987547; Mon, 25 Feb 2019 05:56:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551102987; cv=none; d=google.com; s=arc-20160816; b=fJCHSXzW+sK97cOo6sT9ISoIobFZY3RosDxCtpz4w8cmRg11CMERIiEJmJ2gR4+THU 3GnWKYWpqWjiWy2Am9K5LmOK4mpqdPIPwo09zFSgvInf31rQ2aHMmVXN8mTr3S4N/9j4 nJsLBpVQVUPmhdbW5oYtLBsQBo9RIZwpBPVj8RKiwrq5lSOAZFXL5h47k6h98SicN7/y zM1VKocXCrDsGEdGf/4OvabP1zSedeV8T7IYvv5Y4eVghXr3dZTM8hMrqV5SImPoVe3E iTUfaE+wDIokpTjWiFYQLRyf5iXPHaVoTZ2dudNMZ3/rGYPka8BxicnHsqp567db+82z +SMA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=CrFCGoRyUe4bOKeyTLvEa6sE52uC173uW0pDsjw3vHU=; b=ZP3Qv3pHYrVChRbBDIh5sjXYg//Lia7gDVpeQgvv51135Hv9yM86lgE+pL78GC/nU9 rk4G9VEYISy1ANzOLNzh2A5nkk3B/TjwBfTqkYAO7TC/XKaKxikizRI9+t3USxw4NR73 rjl60qPrWrWu2tB1KBbguJ17CIQUzdkRsjPbLSu3vkYjR96Z4JXz4GZC7CJYNLXsYQUF CAl8kviCNQFDHo6PbVDDYFrmJ52Fyi/WA6E1EQ4u3F9P5o0sA9CpGXSHCCmH6sMCbkb0 xoTFj/eTqHDkFAWdI8f2dIiPA1BledixWepH3yKwfTJJ6bjkoU324r7M8KvShpUCyHO5 7Qtw== 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 p9si12204pls.151.2019.02.25.05.56.12; Mon, 25 Feb 2019 05:56:27 -0800 (PST) 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 S1726789AbfBYNzq (ORCPT + 99 others); Mon, 25 Feb 2019 08:55:46 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:32814 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfBYNzq (ORCPT ); Mon, 25 Feb 2019 08:55:46 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8F57480D; Mon, 25 Feb 2019 05:55:45 -0800 (PST) Received: from [10.1.196.50] (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 12D6F3F575; Mon, 25 Feb 2019 05:55:43 -0800 (PST) Subject: Re: [Xen-devel] xen/evtchn and forced threaded irq To: Oleksandr Andrushchenko , Boris Ostrovsky Cc: Juergen Gross , Stefano Stabellini , Andrew Cooper , "linux-kernel@vger.kernel.org" , Jan Beulich , Dave P Martin , xen-devel References: <5e256d9a-572c-e01e-7706-407f99245b00@arm.com> <20190220000209.GA4091@localhost.localdomain> <21214d47-9c68-e6bf-007a-4047cc2b02f9@oracle.com> <8f7445d7-fa50-f3e9-44f5-cc2aebd020f4@arm.com> <15bc52cb-82d8-4d2c-e5a8-c6ae8de90276@oracle.com> <5df8888a-4a29-fccd-bac2-a9c170244029@arm.com> <13a9616c-2d9a-f90b-3358-f2dcadbbb64d@gmail.com> From: Julien Grall Message-ID: Date: Mon, 25 Feb 2019 13:55:42 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <13a9616c-2d9a-f90b-3358-f2dcadbbb64d@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oleksandr, On 25/02/2019 13:24, Oleksandr Andrushchenko wrote: > On 2/22/19 3:33 PM, Julien Grall wrote: >> Hi, >> >> On 22/02/2019 12:38, Oleksandr Andrushchenko wrote: >>> On 2/20/19 10:46 PM, Julien Grall wrote: >>>> Discussing with my team, a solution that came up would be to introduce one >>>> atomic field per event to record the number of event received. I will >>>> explore that solution tomorrow. >>> How will this help if events have some payload? >> >> What payload? The event channel does not carry any payload. It only notify you >> that something happen. Then this is up to the user to decide what to you with it. > Sorry, I was probably not precise enough. I mean that an event might have > associated payload in the ring buffer, for example [1]. So, counting events > may help somehow, but the ring's data may still be lost From my understanding of event channels are edge interrupts. By definition, they can be merged so you can get a signal notification to the guest for multiple "events". So if you rely on the event to have an associated payload, then you probably have done something wrong in your driver. I haven't implemented PV drivers myself, but I would expect either side to block if there were no space in the ring. What do you do in the displif driver when the ring is full? Cheers, > [1] > https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/io/displif.h;h=cc5de9cb1f35dedc99c866d73d086b19e496852a;hb=HEAD#l756 > -- Julien Grall