Skip to content
Snippets Groups Projects
Commit 37d64e6a authored by Moe Jette's avatar Moe Jette
Browse files

treat suspend_rate==0 or resume_rate==0 as unlimited

parent 5c6458db
No related branches found
No related tags found
No related merge requests found
...@@ -130,7 +130,7 @@ static void _do_power_work(void) ...@@ -130,7 +130,7 @@ static void _do_power_work(void)
if (susp_state) if (susp_state)
susp_total++; susp_total++;
if (susp_state if (susp_state
&& (suspend_cnt <= suspend_rate) && ((suspend_rate == 0) || (suspend_cnt <= suspend_rate))
&& ((base_state == NODE_STATE_ALLOCATED) && ((base_state == NODE_STATE_ALLOCATED)
|| (node_ptr->last_idle > (now - idle_time)))) { || (node_ptr->last_idle > (now - idle_time)))) {
if (wake_node_bitmap == NULL) if (wake_node_bitmap == NULL)
...@@ -141,7 +141,7 @@ static void _do_power_work(void) ...@@ -141,7 +141,7 @@ static void _do_power_work(void)
bit_set(wake_node_bitmap, i); bit_set(wake_node_bitmap, i);
} }
if ((susp_state == 0) if ((susp_state == 0)
&& (resume_cnt <= resume_rate) && (resume_rate == 0) || (resume_cnt <= resume_rate))
&& (base_state == NODE_STATE_IDLE) && (base_state == NODE_STATE_IDLE)
&& (node_ptr->last_idle < (now - idle_time)) && (node_ptr->last_idle < (now - idle_time))
&& ((exc_node_bitmap == NULL) || && ((exc_node_bitmap == NULL) ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment