Guru Prasad
2014-06-30 06:14:47 UTC
Hi all,
First, I would like to establish that I'm fairly new to the scheduler
portion of kernel code.
I'm trying to implement a crude form of the rate limiting approaches
described in:
Currentcy - http://cseweb.ucsd.edu/~vahdat/papers/usenix03.pdf
Pixie - http://www.eecs.harvard.edu/~mdw/papers/pixie-sensys08.pdf
My current design is as follows ('task' refers to the current process'
task_struct):
- I have augmented a hardware simulator(Gem5) with registers that
keep track of energy usage.
- Upon every call to __schedule(), subtract the register value
from 'task->available_energy'
- If 'task->available_energy' is negative:
- Compute 'replenish_time' as time taken to replenish energy
- Call schedule_timeout(msecs_to_jiffies(replenish_time))
- Reset energy registers
I'm primarily looking to disallow scheduling of the current task for
the period defined as 'replenish_time'.
I can see how it might be wrong to call schedule_timeout() from within
__schedule().
If so, what would be the right way of designing such a mechanism?
Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
First, I would like to establish that I'm fairly new to the scheduler
portion of kernel code.
I'm trying to implement a crude form of the rate limiting approaches
described in:
Currentcy - http://cseweb.ucsd.edu/~vahdat/papers/usenix03.pdf
Pixie - http://www.eecs.harvard.edu/~mdw/papers/pixie-sensys08.pdf
My current design is as follows ('task' refers to the current process'
task_struct):
- I have augmented a hardware simulator(Gem5) with registers that
keep track of energy usage.
- Upon every call to __schedule(), subtract the register value
from 'task->available_energy'
- If 'task->available_energy' is negative:
- Compute 'replenish_time' as time taken to replenish energy
- Call schedule_timeout(msecs_to_jiffies(replenish_time))
- Reset energy registers
I'm primarily looking to disallow scheduling of the current task for
the period defined as 'replenish_time'.
I can see how it might be wrong to call schedule_timeout() from within
__schedule().
If so, what would be the right way of designing such a mechanism?
Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html