From owner-freebsd-arm@freebsd.org Fri Nov 27 18:04:08 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A78E04AD891 for ; Fri, 27 Nov 2020 18:04:08 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CjMvX1F2Lz3pXX for ; Fri, 27 Nov 2020 18:04:07 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1606500247; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=edQg0qURr1+ntfkUwk0fEzay0dluTiehCONj7MNk2h4eawEmVLAnXBgihHcC4NtbTkNb8xnlysMgp LfJMlSGFSwyp4/2ezMI8rp1nVRvQbV3qQ0aEhq7yFYjjdv/eNpcjrqXNUZOP41KC52gPAd4x0YZXgZ skHeq1TOw2V7BxLrU12bka8iwzHmVZ0Btfz5thlLvUpwIfKgMIk+J9sFlpXAwSbxyFSUBP4H1PI6do iePUbIXT59ovlV6Mm3ILxncCDQ2tUMfHAtEHpDO8/qrEugd4kFbgFzNS1ZG4SVjBf9tffW6DP7gYQ5 iugk65gE8szpgheCm9sQhsbrtt+9IIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=tmRbCx3RRTTMLCVZ/k7pwNBO62JAB3DU13E3npBQ5Dc=; b=GnS6ei5q2SdNJWAh0oRY2CDOeyjIRD1hGFufDE3xAjJ7XWIxcO+gcHdxhKkEn6IiLJx2vBunztoPR ilm6QLF0cdvtIf0GG8EHEBBdpjSIV/88NwGyoO/H8EOCnKal5DWmXSwuCJRI5PLS6hCpijefaaLULJ q0Ova4W5NpU1CspEq7npZuEK3bkB//NxLltLGpRnBJrxflWhyCbNWVvgUBmwtoEpqDKRXOeBKXb5bI guNcFhVjb2OoJ1nksjHxwUAdxB0weZ4gjKdB4IqRaeC83dpjqrear9695zUUGIa+zbga8kZaYo/mP6 /YnZIA5psZF/qOhmBAXTVqgOaVftcCA== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=tmRbCx3RRTTMLCVZ/k7pwNBO62JAB3DU13E3npBQ5Dc=; b=cTzNoLLcBsEIGavlP09mGMGflt4Q1sRJdWSIwMcFaVa7J7MeNNJ54BglNMcNBrNEcGyxQPo9CB4JX 2zw1qJtxUgRfgq2X6C58yJlWPeMxvlrNIdakP0Htpfx12bZbHFozeQ4oyZT1nd+5VZU8J3EnBqoQdY lQsmCzk0960pJ5vhMwrveG/qLN9cSlQokCJ+gJ1xsQ5Eh39Mt5JHsWXm3rmok3GZ4LJuxhjmgrzlEA fJOYDg+nEeOYAXCAJw6O8Kne09qszGApWh/Hlkc4Kh2Oe8frLG0VmZf2hcbOaXtKo8MnucUCb29wRu 0S3FyvS3AR/ixBNzxI3vydrZXSNN2TA== X-MHO-RoutePath: aGlwcGll X-MHO-User: f00d981e-30da-11eb-9e13-df46ed8f892f X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id f00d981e-30da-11eb-9e13-df46ed8f892f; Fri, 27 Nov 2020 18:04:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 0ARI45SS080545 for ; Fri, 27 Nov 2020 11:04:05 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1e6993d43d22d6ce1aa2860a61745356688d1e53.camel@freebsd.org> Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 From: Ian Lepore To: freebsd-arm@freebsd.org Date: Fri, 27 Nov 2020 11:04:05 -0700 In-Reply-To: <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4CjMvX1F2Lz3pXX X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 18:04:08 -0000 On Fri, 2020-11-27 at 10:16 -0700, Ian Lepore wrote: > On Fri, 2020-11-27 at 14:28 +0300, Vladimir Goncharov wrote: > > Here it is. > > There is struct gpioc_event with pin number and bintime which is send > > to userspace. > > > > Also I'm thinking about to implementation notofication without extra > > reading from socket via struct kevent's extra fields (fflags/ext[4]), > > looks like it is possible. > > > > Please don't top-post on freebsd mailing lists. > > I think we need a way for the app to choose whether it wants simple > reporting of pin number (like the original code) perhaps along with a > count, versus requesting detailed per-event data. I'm going to propose > something more detailed about this as soon as I get my thoughts all > organized. I also want to get the original code and the locking fixes > I've done to it into a phab review for people to start looking at > before starting to do new major changes to it. > > Allocating memory in the interrupt handler isn't a good idea, it will > just increase latency on processing other pin interrupts and lead to > inaccurate timestamps. IMO, it would be better to allocate a fixed > array of events; when the app requests detailed event reporting it can > request the number of stored events it wants handled and we could > allocate all at once based on that. > The gsoc2018 code, with locking and style(9) fixes, is now at: https://reviews.freebsd.org/D27398 -- Ian