User space <==> kernel space for device wakeups.
manty kuma
mantykuma at gmail.com
Wed Oct 8 21:38:12 EDT 2014
Hi All,
Thank you for the replies. I understand that I can use netlink sockets.
Also, i have gone through various other possible ways :
http://people.ee.ethz.ch/~arkeller/linux/kernel_user_space_howto.html
I am looking for a simpler solution which uses existing information of sys
entries. That is, I am looking for a sys entry which is incremented for
every device wakeup or some other sys entry that I can use to get notified
on wakeup.
Greg,
>> Really? My device can "wakeup" thousands of times a second, what are
you going to do with that type of information?
I am talking of device as a whole not individual devices in the device. In
kernel log, we can see a print stating
"PM: suspend of devices complete after xxx msecs" --> *Prints from
kernel/kernel/power/main.c*
Similarly I get a print for resume stating
"PM: resume of devices complete after xxx msecs" --> *Prints from
kernel/kernel/power/main.c*
Ideally after the above print of resume i want my stats to be printed..
Programatically after dpm_resume_end().
Best Regards,
Manty
On Thu, Oct 9, 2014 at 3:30 AM, Jinqiang Zeng <jinqiangzeng at gmail.com>
wrote:
> 2014-10-08 0:39 GMT-07:00 manty kuma <mantykuma at gmail.com>:
> > Hi,
> > I want a user process to be notified on device wakeup so that I can print
> > some related information.
> >
> > Which framework to use for this?(events, .. ??)
>
> You can use netlink and uevent to do this job.
>
> But just as Greg has pointed out, if your device notify frequently,
> your system will get slow down obviously.
>
> >
> > One idea I get is to log the info into <debugfs> and poll(implement my
> poll)
> > on it for data. This is my last option.
> >
> > Are there any better ways?
> >
> > Best Regards,
> > Manty
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies at kernelnewbies.org
> > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141009/366ea6e8/attachment-0001.html
More information about the Kernelnewbies
mailing list