I have a small question that if it really happens frequently that your
system falls into
idle process?
Just a little oppinion, can you just create another process to do the
"lowpower" work? I think the scheduler should try to run your "lowpower"
process before entering idle process, because it actually means a busy
process comparing to idle process.
From: Matthew Percival <matthew@xxxxxxxxx>
To: kernelnewbies@xxxxxxxxxxxx
Subject: Scheduler mod: dropping to low power...
Date: Thu, 01 Dec 2005 16:02:56 +1100
G'Day,
I am looking to make a modification to the scheduler (2.6.14) for an
embedded system. The basic idea is to drop into a lower power mode,
rather than scheduling an idle task, when there is no real work to be
done. The plan is then to trigger a wake up on a counter interrupt, so
that it wakes just before the next timeslice is due.
My first question is: `is this feasible?' Would it be reasonable for
someone who is not the god of kernel hackers to make something like this
work, and work (reasonably) efficiently. I think I have some idea about
how to do this, but am concerned I could be missing some points, and
only end up making a real mess of things. To give some idea of my
relative skill, I have written a couple of drivers, and made a variety
of miscellaneous mods to the kernel before: lots of extensions and
alterations, but very little new ground.
Secondly, I am thinking of doing this by replacing rq->idle with a task
which calls the sleep function (which will be added to the power
management file). Is this a good idea, or should I instead call the
routine from a specific part of sched.c (eg somewhere in schedule())?
Replacing the idle function with my routine seems a logical way to do
things, but I have this nasty feeling that it would be the Wrong Thing.
I am just a little concerned about touching the scheduler, and was
hoping for a little reassurance that I have the right idea before I jump
headlong into things.
Thanks,
Matthew
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/