Rapl node capping daemon #21
|
@ -12,9 +12,9 @@ import (
|
|||
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
|
||||
const raplPrefixCPU = "intel-rapl"
|
||||
|
||||
// constraint_0 is usually the longer window while constraint_1 is usually the longer window
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
const maxPowerFileShortWindow = "constraint_0_max_power_uw"
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
const powerLimitFileShortWindow = "constraint_0_power_limit_uw"
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
// constraint_0 is usually the longer window while constraint_1 is usually the shorter window
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
const maxPowerFileLongWindow = "constraint_0_max_power_uw"
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
const powerLimitFileLongWindow = "constraint_0_power_limit_uw"
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
|
||||
// capNode uses pseudo files made available by the Linux kernel
|
||||
// in order to capNode CPU power. More information is available at:
|
||||
|
@ -22,7 +22,7 @@ const powerLimitFileShortWindow = "constraint_0_power_limit_uw"
|
|||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
func capNode(base string, percentage int) error {
|
||||
|
||||
if percentage <= 0 || percentage > 100 {
|
||||
return fmt.Errorf("cap percentage must be between 0 (non-inclusive) and 100 (inclusive): %d", percentage)
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
return fmt.Errorf("cap percentage must be between (0, 100]: %d", percentage)
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
}
|
||||
|
||||
files, err := ioutil.ReadDir(base)
|
||||
|
@ -41,7 +41,7 @@ func capNode(base string, percentage int) error {
|
|||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
}
|
||||
|
||||
if fields[0] == raplPrefixCPU {
|
||||
maxPower, err := maxPower(filepath.Join(base, file.Name(), maxPowerFileShortWindow))
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
maxPower, err := maxPower(filepath.Join(base, file.Name(), maxPowerFileLongWindow))
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
if err != nil {
|
||||
fmt.Println("unable to retreive max power for zone ", err)
|
||||
continue
|
||||
![]() any reason for just printing the error and not returning it? any reason for just printing the error and not returning it?
Basically, the question is whether we need to continue to attempt to powercap if an error occurs anywhere in the process.
![]() Agreed, I don't know what the right path to take is here. If the file write fails, we could be left in an inconsistent state. The only options here are to bail and return an error right away, or to continue trying to cap the node and then returning an array of zones where were unable to cap the node in. Agreed, I don't know what the right path to take is here. If the file write fails, we could be left in an inconsistent state. The only options here are to bail and return an error right away, or to continue trying to cap the node and then returning an array of zones where were unable to cap the node in.
![]() Any chance we can roll back the power limits set to the previous values if and when any of the file writes fail? Any chance we can roll back the power limits set to the previous values if and when any of the file writes fail?
![]() If the write fails, we're sort of left in limbo. If the write to modify it failed, then most likely the write to restore the value will fail too. We can try reading it and seeing if that's the same value as before. If the write fails, we're sort of left in limbo. If the write to modify it failed, then most likely the write to restore the value will fail too. We can try reading it and seeing if that's the same value as before.
|
||||
|
@ -50,7 +50,7 @@ func capNode(base string, percentage int) error {
|
|||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
// We use floats to mitigate the possibility of an integer overflows.
|
||||
powercap := uint64(math.Ceil(float64(maxPower) * (float64(percentage) / 100)))
|
||||
|
||||
err = capZone(filepath.Join(base, file.Name(), powerLimitFileShortWindow), powercap)
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
err = capZone(filepath.Join(base, file.Name(), powerLimitFileLongWindow), powercap)
|
||||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
||||
if err != nil {
|
||||
fmt.Println("unable to write powercap value: ", err)
|
||||
continue
|
||||
![]() same here regarding whether the error to continue if error occurs or should we just return it. same here regarding whether the error to continue if error occurs or should we just return it.
|
||||
|
|
|||
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
![]() constraint_1 is the shorter window. constraint_1 is the shorter window.
![]() maybe just say cap percentage must be in the range (0, 100]. maybe just say **cap percentage must be in the range (0, 100]**.
![]() constraint_0 is the longer window. constraint_0 is the longer window.
Going by [this](https://github.com/spdfg/elektron/blob/master/scripts/RAPL_PKG_Throttle.py#L48) we are intending to use the longer window for running average calculations.
So, change the variable name to `maxPowerFileLongWindow`?
![]() ditto. ditto.
![]() overflow overflow~s~
![]() fits on a single line. fits on a single line.
![]() Can you expand on this comment? Can you expand on this comment?
![]() Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is. Actually, your way of representing the ranges is more explicit and clear. One is not well-versed with range expressions would still be able to understand your explanation. So, ignore my previous statement and leave it as is.
![]() Either change overflows to overflow, or get rid of the "an". Either change **overflows** to **overflow**, or get rid of the "an".
![]() Good catch, fixed. Good catch, fixed.
![]() Fixed this, definitely a mistake on my part. Thanks for catching it! Fixed this, definitely a mistake on my part. Thanks for catching it!
![]() I'll revert it I'll revert it
|
constraint_1 is the shorter window.
maybe just say cap percentage must be in the range (0, 100].
constraint_0 is the longer window.
Going by this we are intending to use the longer window for running average calculations.
So, change the variable name to
maxPowerFileLongWindow
?ditto.
overflow
sfits on a single line.