Calling hibernate from workqueue

Pranay Srivastava pranjas at gmail.com
Mon Jun 9 11:36:07 EDT 2014


On Jun 9, 2014 8:47 PM, "AYAN KUMAR HALDER" <ayankumarh at gmail.com> wrote:
>
> Hi,
>
> I am using a arm based muticore platform.
>
> I intend to call hibernate from a push button interrupt. I have
> initialized a workqueue for calling hibernate() and have scheduled it
> in the push button interrupt service routine. I have chosen workqueue
> over tasklet for the reason:-
> 1. Workqueue gets called in process context whereas tasklet gets
> called in deferred interrupt context and thus as hibernate is a long
> process (which can sleep) , I found workqueue to be more suitable.
>
> My query is that does the function added in workqueue get executed on
> a  different core than from where it gets scheduled. In my case, it
> would be a major issue as hibernate() is expected to get called from
> core0 only.
>
have you tried

queue_work_on?

> If so, what is the possible remedy to suffice my need. I understand
> that workqueue cannot be assigned to a particular core.
>
> Please correct me if my understanding is incorrect.
>
> Regards,
> Ayan Kumar Halder
>
> _______________________________________________
> 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/20140609/f26f151c/attachment.html 


More information about the Kernelnewbies mailing list