On 04/25/2012 01:09 AM, Kanishka Ariyapala wrote: > Yes you have a point there, once other user applications are starting > and the process I have added may be pushed to sleep (waiting for some > resource) it will not be in the rb tree. > > However what I am trying to achieve is context-aware scheduling. By > context I mean office, home, driving etc. So under that context to > pre-schedule some applications I have predefined for those contexts, > or give high priority(for this you need to have this in the run > queue,rty?) and give other user applications low priority. > > How do you think I should approach this?
I would be tremendously surprised if the delay at startup had much to do with scheduling, rather than latencies related to demand-paging the program into memory. You might want to profile the actual application startup (with a tracer or perf) and see where the startup costs actually are. (Just the ftrace function tracer should be quite useful to see what the kernel is up to during your application load.) I have a hunch you'll find the startup cost is in the memory loading and initial application initialization. If you want to pre-load data to reduce the memory loading cost, try reading ahead the data. See http://elinux.org/Android_Boot-time_Readahead for some information on this topic. -- Tim ============================= Tim Bird Architecture Group Chair, CE Workgroup of the Linux Foundation Senior Staff Engineer, Sony Network Entertainment ============================= -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
