Re: idle task check

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

 



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@xxxxxxxxx> wrote:


On June 4, 2015 3:35:25 AM EDT, Mustafa Hussain <mustafa.hussain93@xxxxxxxxx> 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@xxxxxxxxx>
>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@xxxxxxxxx
>>> 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@xxxxxxxxx> wrote:
>>>
>>>>
>>>>
>>>> On 2015-06-02 06:25 PM, Valdis.Kletnieks@xxxxxx 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.
_______________________________________________
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