Re: User space <==> kernel space for device wakeups.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:
2014-10-08 0:39 GMT-07:00 manty kuma <mantykuma@xxxxxxxxx>:
> 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@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux