Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp368153img; Tue, 26 Feb 2019 01:16:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IaZOXECIxmIfwINa0zowEx8IG9WwY9x0sKYJbqofA7WlGEmpdF7d7I5Emj6l1RCJLEHL79b X-Received: by 2002:a62:f201:: with SMTP id m1mr24990007pfh.97.1551172601660; Tue, 26 Feb 2019 01:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551172601; cv=none; d=google.com; s=arc-20160816; b=omqp377ta0f5TEuf32a97zx2+TbdDZAEz8kOz41H5WIoVB/jCEfj5qVvmAqOfWYRDK O7JioU7yTdwvkYUWZIwK199abYNOkiKh0PajdkrHmxS9SZYkVcGw/Dw64C9BPBFqNq6K cGclWtfd2XWEyn6y4m3z1tRbW1SC958aQZ1AvpBU9pbwySZ67L3x6NuzX3Sx+URVypor p+5z/OheteaY3UwYt74hYdz6u2Dmm0RrhxNl0EoVYLKPh/pMj5D1OiyLHzukAlooD5TE O9gejX+1mKtbS+5Ld5bHeaLU1gR2yha6VzmCi9rWqQabWh3Je8hsagfPF5Dn7jbm3rbh FmCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ag62XmAIL/INU7pBx/lNkdgTeZpZYAjX5uZkhsGoINE=; b=ILBnmgUelije+f/wTjO5AWZm4L5PeEqJfTNo8LeoTNqbptyv3+CVnVJZlZRXc451WK chabSAurnIyNym4SFTESMYrYtduszbdroGJUSNz4FfcjQiu7pSMe/iphDbKdzc6BZvxH epnlChp3t6za9WnONRzreareGvrzF7oLZhXlGm9O+x5x8S2gpNsav7dflK5zgfaBvkHl xxu03uc6q3/Wnsb1Za1WGLTZGFDmKezBWMjkbXzR5X4mvendQ0THD57BLBhv2U4ar76e griE7vZpfsA6G5t5JKFKsxMcMv5zoYkyomR52TlwOGr7j47zeIwY81KQWTmt1mFBA/rd QfDQ== 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 x7si4062774plr.73.2019.02.26.01.16.26; Tue, 26 Feb 2019 01:16:41 -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 S1727505AbfBZJOs (ORCPT + 99 others); Tue, 26 Feb 2019 04:14:48 -0500 Received: from smtp.eu.citrix.com ([185.25.65.24]:53541 "EHLO SMTP.EU.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727067AbfBZJOs (ORCPT ); Tue, 26 Feb 2019 04:14:48 -0500 X-IronPort-AV: E=Sophos;i="5.58,415,1544486400"; d="scan'208";a="86450557" Date: Tue, 26 Feb 2019 10:14:20 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Julien Grall CC: Oleksandr Andrushchenko , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , Andrew Cooper , "linux-kernel@vger.kernel.org" , Jan Beulich , xen-devel , Dave P Martin Subject: Re: [Xen-devel] xen/evtchn and forced threaded irq Message-ID: <20190226091420.klgldhotiecezw6h@Air-de-Roger> References: <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> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 25, 2019 at 01:55:42PM +0000, Julien Grall wrote: > 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, IMO event channels are active high level interrupts. Let's take into account the following situation: you have an event channel masked and the event channel pending bit (akin to the line on bare metal) goes from low to high (0 -> 1), then you unmask the interrupt and you get an event injected. If it was an edge interrupt you wont get an event injected after unmasking, because you would have lost the edge. I think the problem here is that Linux treats event channels as edge interrupts, when they are actually level. Roger.