idle task check

Mustafa Hussain mustafa.hussain93 at gmail.com
Thu Jun 4 07:56:30 EDT 2015


All i am trying to do is to detect idle task and remove it from the running
queue or deactivate it.
Thank you for your patience :)
On 4 Jun 2015 14:51, "Nicholas Krause" <xerofoify at gmail.com> wrote:

>
>
> On June 4, 2015 3:35:25 AM EDT, Mustafa Hussain <
> mustafa.hussain93 at gmail.com> wrote:
> >System crashes,  system can not start
> >
> I was not thinking and this schedules the idle thread. What are you trying
> to accomplish through.
> Nick
> >
> >On June 3, 2015 9:41:52 PM EDT, Mustafa Hussain
> ><mustafa.hussain93 at gmail.com>
> >wrote:
> >>i want to dequeue the idle task how can i do this ?
> >Why there is no point.  Clearly your asking questions in order to learn
> >the
> >scheduler.
> >If your interested in learning it I  can help but,  you need to think
> >about
> >what you
> > trying to accomplish first.
> >Nick
> >
> >>On Thu, Jun 4, 2015 at 3:40 AM, Mustafa Hussain
> >><mustafa.hussain93 at gmail.com
> >>> wrote:
> >>
> >>> Hi nick,
> >>> i applied your suggested edit and i got "bad: scheduling from the
> >>idle
> >>> thread!"
> >>> how can i solve this ?
> >>>
> >>> On Wed, Jun 3, 2015 at 12:29 AM, nick <xerofoify at gmail.com> wrote:
> >>>
> >>>>
> >>>>
> >>>> On 2015-06-02 06:25 PM, Valdis.Kletnieks at vt.edu wrote:
> >>>> > On Tue, 02 Jun 2015 23:38:48 +0200, Mustafa Hussain said:
> >>>> >
> >>>> >>> /*Check if the pointer pointing to the idle class is equal to
> >>prev's
> >>>> >>> sched_class*/
> >>>> >>> if(prev->sched_class == idle)
> >>>> >>> After this condition you can just:
> >>>> >>> printk(KERN_INFO "Prev is equal to idle_sched_class,now running
> >>the
> >>>> idle
> >>>> >>> sched_class\n");
> >>>> >
> >>>> > Hopefully, you didn't take Nick's advice without thinking about
> >>it....
> >>>> >
> >>>> > As I type this, powertop tells me:
> >>>> >
> >>>> > Summary: 821.8 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS
> >>ops/sec
> >>>> and 18.8% CPU use
> >>>> >
> >>>> > That printk is going to spam your dmesg pretty hard.
> >>>> >
> >>>> > A better question is:
> >>>> >
> >>>> > If prev is about to go idle, *what do you want to do*?  (Hint:
> >>newer
> >>>> > kernels already do a bunch of stuff when a cpu/core goes idle,
> >you
> >>>> > probably want to make sure you're not working against something
> >>here...)
> >>>> >
> >>>> I didn't account for rate limiting the debug messages, forgot about
> >>that
> >>>> . :)
> >>>> I do agree his question is not the best but he wanted a answer so I
> >>>> decided
> >>>> to just give him a answer that works for his learning.
> >>>> Nick
> >>>>
> >>>
> >>>
> >
> >--
> >Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20150604/187de8c1/attachment.html 


More information about the Kernelnewbies mailing list