Kernel idle

2015-07-08 Thread jinz...@wingtech.com
Dear sir:
 How to check if the device can enter into deep idle mode or sleep mode?
Thanks!
___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: kernel idle fucntion......

2011-02-07 Thread Dave Hylands
Hi Murali,

Whoops - meant to reply to the list.

On Mon, Feb 7, 2011 at 6:32 AM, Murali N  wrote:
> Hi,
> I have one basic doubt on kernel idle function. Who called the kernel
> cpu_idle function?

The code which boots up the kernel becomes the idle thread. It's
called from the end of rest_init
<http://lxr.linux.no/linux+v2.6.37/init/main.c#L425>

> I know a theory that it gets called when there is no activity in the
> system? Here i have the following question.
>
> 1. How cpu knows that there is nothing to be left out to run?
> scheduler get to know this by looking the RUN queue?

The idle thread is always ready to run. It just happens to be the
lowest priority thread on the system, so it only runs when there is
nothing else to do.

> Also in 'kernel/arch/arm/process.c' file i saw a variable called
> 'hlt_counter', what exactly is this variable?

I think that this is from the x86 world. It seems to be "disabling the
HLT instruction"
<http://en.wikipedia.org/wiki/HLT>

Executing the halt instruction is effectively the equivalent of
entering low power idle (during which the CPU is not executing any
instructions at all).

I suppose it might be useful for certain polling operations.

Dave Hylands

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


kernel idle fucntion......

2011-02-07 Thread Murali N
Hi,
I have one basic doubt on kernel idle function. Who called the kernel
cpu_idle function?
I know a theory that it gets called when there is no activity in the
system? Here i have the following question.

1. How cpu knows that there is nothing to be left out to run?
scheduler get to know this by looking the RUN queue?

Also in 'kernel/arch/arm/process.c' file i saw a variable called
'hlt_counter', what exactly is this variable?

Can somebody share your thoughts on this

-- 
Regards,
Murali N

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