ran wainstein
04/20/2011 11:45 AM
post85166
|
Hi all,
Does the Kernel supports variable tick ?
Meaning, on a system with 1ms tick resolution, if the system can go to 4ms idle, will the tick size be modified to 4ms ?
if not - system can never be idle more then 1ms..it will wake up just to figure out it can go to sleep again..not
optimized for power consumption
Any Ideas ?
Thanks,
Ran
|
|
|
Attilla Danko(deleted)
04/20/2011 12:12 PM
post85167
|
We call it "tickless operation". And yes, the kernel figures out when the next timer interrupt must be and arragnes to
inhibit tick interrupts until then.
-----Original Message-----
From: ran wainstein [mailto:community-noreply@qnx.com]
Sent: Wed 2011-04-20 11:45
To: ostech-core_os
Subject: Kernel Tick
Hi all,
Does the Kernel supports variable tick ?
Meaning, on a system with 1ms tick resolution, if the system can go to 4ms idle, will the tick size be modified to 4ms ?
if not - system can never be idle more then 1ms..it will wake up just to figure out it can go to sleep again..not
optimized for power consumption
Any Ideas ?
Thanks,
Ran
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post85166
|
|
|
Oleh Derevenko(deleted)
04/20/2011 12:49 PM
post85168
|
Hm... That's interesting...
And if kernel schedules next timer tick for those 4 ms and after that in 500 mks some other hardware (e.g. disk)
requests an interrupt and handler of that interrupt schedules event for 1 ms? How can the kernel know what was the time
value at the moment of disk interrupt to schedule 1 ms delay properly without introducing clock time error? It would not
be able to align with the next tick since the tick would only come in 3.5 ms.
> We call it "tickless operation". And yes, the kernel figures out when the next
> timer interrupt must be and arragnes to inhibit tick interrupts until then.
>
>
> -----Original Message-----
> From: ran wainstein [mailto:community-noreply@qnx.com]
> Sent: Wed 2011-04-20 11:45
> To: ostech-core_os
> Subject: Kernel Tick
>
> Hi all,
> Does the Kernel supports variable tick ?
>
> Meaning, on a system with 1ms tick resolution, if the system can go to 4ms
> idle, will the tick size be modified to 4ms ? if not - system can never be
> idle more then 1ms..it will wake up just to figure out it can go to sleep
> again..not optimized for power consumption
>
> Any Ideas ?
>
> Thanks,
> Ran
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post85166
>
>
|
|
|
Attilla Danko(deleted)
04/20/2011 1:41 PM
post85173
|
When the kernel is running tickless, it's still measuring the passage of time in a hardware counter (just not causing a
tick interrupt). When the kernel is woken by an interrupt during a tickless interval, it updates its software timers,
which are essentially tick counter, from the hardware counters.
-----Original Message-----
From: Oleh Derevenko [mailto:community-noreply@qnx.com]
Sent: Wed 2011-04-20 12:49
To: ostech-core_os
Subject: Re: RE: Kernel Tick
Hm... That's interesting...
And if kernel schedules next timer tick for those 4 ms and after that in 500 mks some other hardware (e.g. disk)
requests an interrupt and handler of that interrupt schedules event for 1 ms? How can the kernel know what was the time
value at the moment of disk interrupt to schedule 1 ms delay properly without introducing clock time error? It would not
be able to align with the next tick since the tick would only come in 3.5 ms.
> We call it "tickless operation". And yes, the kernel figures out when the next
> timer interrupt must be and arragnes to inhibit tick interrupts until then.
>
>
> -----Original Message-----
> From: ran wainstein [mailto:community-noreply@qnx.com]
> Sent: Wed 2011-04-20 11:45
> To: ostech-core_os
> Subject: Kernel Tick
>
> Hi all,
> Does the Kernel supports variable tick ?
>
> Meaning, on a system with 1ms tick resolution, if the system can go to 4ms
> idle, will the tick size be modified to 4ms ? if not - system can never be
> idle more then 1ms..it will wake up just to figure out it can go to sleep
> again..not optimized for power consumption
>
> Any Ideas ?
>
> Thanks,
> Ran
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post85166
>
>
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post85168
|
|
|
ran wainstein
04/20/2011 2:13 PM
post85174
|
So - how can I set the Kernel to run in "tickles mode" ?
I there any reference you can provide to learn more about this feature ? could not find nothing on this.
Does it requires different timers call outs ?
What if I hook into Idle() - I've noticed the Idle handler will get the next timer interrupt event as IN param, can I
still use this hook in a tickles mode ?
Thanks,
Ran
|
|
|
ran wainstein
04/21/2011 12:14 PM
post85183
|
Atilla hi,
Can you tell me how to enable tickles timer ?
Thanks,
Ran
|
|
|
Chris Travis
04/21/2011 12:19 PM
post85184
|
To enable use the -Z option to startup
-----Original Message-----
From: ran wainstein [mailto:community-noreply@qnx.com]
Sent: April 21, 2011 12:15 PM
To: ostech-core_os
Subject: Re: RE: RE: Kernel Tick
Atilla hi,
Can you tell me how to enable tickles timer ?
Thanks,
Ran
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post85183
|
|
|
Chris Travis
|
Re: RE: RE: RE: Kernel Tick
|
Chris Travis
04/21/2011 1:14 PM
post85186
|
Re: RE: RE: RE: Kernel Tick
BTW this is not available in versions 6.5.0 or earlier
|
|
|
ran wainstein
|
Re: RE: RE: RE: Kernel Tick
|
ran wainstein
04/21/2011 1:16 PM
post85187
|
Re: RE: RE: RE: Kernel Tick
Thanks, 6.5.0 is the latest as far as I know.
Is there a newer SDP then that ?
Ran
|
|
|
Chris Travis
|
RE: RE: RE: RE: Kernel Tick
|
Chris Travis
04/21/2011 2:17 PM
post85190
|
RE: RE: RE: RE: Kernel Tick
No, that is the latest. If you have a service plan you can request a
Priority Support Patch through your QNX contact.
Chris
-----Original Message-----
From: ran wainstein [mailto:community-noreply@qnx.com]
Sent: April 21, 2011 1:17 PM
To: ostech-core_os
Subject: Re: RE: RE: RE: Kernel Tick
Thanks, 6.5.0 is the latest as far as I know.
Is there a newer SDP then that ?
Ran
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post85187
|
|
|
ran wainstein
|
Re: RE: RE: RE: RE: Kernel Tick
|
ran wainstein
04/21/2011 2:53 PM
post85191
|
Re: RE: RE: RE: RE: Kernel Tick
Thanks, service plan is on the way.
Do you happen to know if there is a patch for "cpu hotplug" ? ( add\remove CPU's on the the fly ? )
Is there a list of available patches somewhere ?
Thanks
Ran
|
|
|
Chris Travis
|
RE: RE: RE: RE: RE: Kernel Tick
|
Chris Travis
04/21/2011 3:08 PM
post85192
|
RE: RE: RE: RE: RE: Kernel Tick
Never used any hardware that we could enable/disable processors on the
fly...not sure what the smp kernel would do?
BSPs are available:
http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/BSPAndDri
vers
650 patches at:
http://www.qnx.com/download/group.html?programid=20905
-----Original Message-----
From: ran wainstein [mailto:community-noreply@qnx.com]
Sent: April 21, 2011 2:53 PM
To: ostech-core_os
Subject: Re: RE: RE: RE: RE: Kernel Tick
Thanks, service plan is on the way.
Do you happen to know if there is a patch for "cpu hotplug" ? (
add\remove CPU's on the the fly ? )
Is there a list of available patches somewhere ?
Thanks
Ran
_______________________________________________
OSTech
http://community.qnx.com/sf/go/post85191
|
|
|
ran wainstein
|
Re: RE: RE: RE: RE: RE: Kernel Tick
|
ran wainstein
04/21/2011 3:17 PM
post85195
|
Re: RE: RE: RE: RE: RE: Kernel Tick
Thanks.
With all those multi-core embedded devices out there, it would be useful from power perspective to be able to turn on\
off cores when not needed, or even create CPU's partitioning. SMP kernel should migrate processes accordingly. it is
implemented in Linux.
As for the tickles thing, I'll consult with our QNX rep. , this is a must have feature for power management.
Ran
|
|
|
Attilla Danko(deleted)
04/21/2011 3:30 PM
post85196
|
Dynamically turning cpus on and off as a funtion of load is implemented in 6.6 for the Playbook platform (arm). We also
implemented dynamic voltage and frequency scaling. We did both to support power management.
I suspect extending to other platforms would be a matter of CE work. Rather a lot of CE work, I would think.
ran wainstein wrote:
> Thanks.
>
> With all those multi-core embedded devices out there, it would be useful from power perspective to be able to turn on\
off cores when not needed, or even create CPU's partitioning. SMP kernel should migrate processes accordingly. it is
implemented in Linux.
>
> As for the tickles thing, I'll consult with our QNX rep. , this is a must have feature for power management.
>
>
>
> Ran
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post85195
>
|
|
|
ran wainstein
04/21/2011 3:38 PM
post85197
|
Thanks, makes sense.
I can probably handle DFM\DFM in a driver, but for hot plug and tickles I will need Kernel changes.
But - I do have a question about DFM\DVM :
Obviously , I will change freq\voltage based on CPU utilization %. What will be the best way to measure cpu util ?
utilities like hogs and top are nice, but I'm looking for API I can use from my cpu profiler.
I've ended up implemented this by creating Adaptive Partition ( system , 100% ) , and use the APS API's for getting Idle
counts, works well, but APS might be overkill for this ?
Thanks,
Ran
|
|
|
Attilla Danko(deleted)
04/21/2011 3:48 PM
post85198
|
The kernel calccualte cpu load (most efficeint place to do it) and uses programmable thesholds to switch between cpu
speeds. Also handles hysteresis. However, the kernel requires a dll will callouts to actually manipualte the hardware to
switch cpu frequencies. Those callouts are platform dependant. We've implemented for the OMAP4430 platform only. Things
can get very complicated when the different cpu speed cpu states interact with powerstates of other parts of the SOC,
like DMA controllers, power regulators and clock sources.
ran wainstein wrote:
> Thanks, makes sense.
>
> I can probably handle DFM\DFM in a driver, but for hot plug and tickles I will need Kernel changes.
>
>
> But - I do have a question about DFM\DVM :
>
> Obviously , I will change freq\voltage based on CPU utilization %. What will be the best way to measure cpu util ?
>
> utilities like hogs and top are nice, but I'm looking for API I can use from my cpu profiler.
>
> I've ended up implemented this by creating Adaptive Partition ( system , 100% ) , and use the APS API's for getting
Idle counts, works well, but APS might be overkill for this ?
>
> Thanks,
> Ran
>
>
>
> _______________________________________________
>
> OSTech
> http://community.qnx.com/sf/go/post85197
>
|
|
|
Chris Travis
|
Re: RE: RE: RE: RE: Kernel Tick
|
Chris Travis
04/21/2011 3:13 PM
post85193
|
Re: RE: RE: RE: RE: Kernel Tick
I was incorrect in my statement that you can get new features in a PSP. It would actually be a Custom Engineering
request since it would be a back port of a custom feature into a past release.
|
|
|
Chris Travis
|
Re: RE: RE: RE: RE: Kernel Tick
|
Chris Travis
04/21/2011 3:15 PM
post85194
|
Re: RE: RE: RE: RE: Kernel Tick
...CE would not be covered under a support plan.
Chris
|
|
|
ran wainstein
|
Re: RE: RE: RE: RE: Kernel Tick
|
ran wainstein
04/21/2011 4:25 PM
post85199
|
Re: RE: RE: RE: RE: Kernel Tick
Attilla,
I'm aware of the complication, probably some kind of voting mechanism needed to be implemented before making PM decision
.
I understand the those features were implemented in 6.6 for RIM's play book, and I can engage QNX and request CE if I
need them on 6.5,
Any ideas when 6.6 will be released ? we care about power too :)
Thanks,
Ran
|
|
|
|