Date: Fri, 27 Nov 2020 10:16:53 -0700 From: Ian Lepore <ian@freebsd.org> To: Vladimir Goncharov <freebsd@viruzzz.org>, freebsd-arm@freebsd.org Subject: Re: User Space GPIO Interrupt programming - GSoC-2018 Message-ID: <08649892ca2ab434c261d36e0e13ba051086de6f.camel@freebsd.org> In-Reply-To: <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org> References: <2B01780F-D367-48A3-A827-B479030A496D@obsigna.com> <c55d7f332631b69c3241a60538a6a7b5475d93b9.camel@freebsd.org> <FBEF19B1-0504-4CDF-976C-C50707E06584@obsigna.com> <8d806302-479c-ca34-3fdb-96d27f40e212@viruzzz.org> <8655AF30-273B-48E7-98CD-007AA1D265F5@obsigna.com> <54ffe2d2-01a2-8b43-94fa-aee4a3f89861@viruzzz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08649892ca2ab434c261d36e0e13ba051086de6f.camel>