Signals vs. IOCTL: Notify interrupts to user space
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I suggest that you "send a signal." The signal-handler can then use IOCTL to find whatever else it needs to know – and it can do so at any convenient time as it sees fit.
The whole idea is to avoid so-called "busy waiting."
Your first-level interrupt handler should gather all of the necessary information into a place that the IOCTL can then retrieve. Then, it launches a user-space signal, unless it notices that a signal has already been launched. The userland program "only pays attention to the telephone because it is ringing."
Last edited by sundialsvcs; 10-27-2021 at 05:44 PM.
Is there some point at which you'll be able to apply things you've been told and learned?? You've been asking about/working with IOCTL for TWELVE YEARS now; and that question is nearly IDENTICAL to this one: https://www.linuxquestions.org/quest...-space-746821/
Strange. I downloaded long term linux-5.10.76.tar.xz
and looked for send_sig_info in drivers folder.
There are only 3 (!!!) drivers that use it.
If using signals is better than IOCTLs (for application to be notified on interrupts) why it is almost not used ?
My collegue claims that with signals, the time between the interrupt to the notification in the application is much shorter compared to using IOCTL.
Hi,
Strange. I downloaded long term linux-5.10.76.tar.xz and looked for send_sig_info in drivers folder. There are only 3 (!!!) drivers that use it.
If using signals is better than IOCTLs (for application to be notified on interrupts) why it is almost not used ? My collegue claims that with signals, the time between the interrupt to the notification in the application is much shorter compared to using IOCTL.
Still don't have any idea why you're asking. You've been working on this for twelve years...you have a 'colleague' who works with you on this. So why don't you and your 'colleague' try both approaches on your hardware, and see which works better for you??? Run some actual tests....do some actual work on your own actual hardware.
Hi,
Before changing approach to signals, I have to be sure that this method is better than using IOCTL based on the experience of the experts here.
Wrong: you need to make sure it's better by actually testing it for your own purposes on your own hardware by doing your own work (bold for emphasis). What works in one scenario may not work as well for others, so the excuse of, "I need experts else to tell me" isn't believable.
Again, you have been working on this for TWELVE YEARS now; you have repeatedly asked about kernel modules/hardware/etc., so there is *ABSOLUTELY NOTHING* stopping you from testing things. If this is for your work, you have ample time/resources to do the best job you can; there is no reason NOT to try both approaches. You and your 'colleague' can work together, can't you?? If your 'colleague' says it's better and you say different, then you can ask them to prove it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.