kernel: check for NULL smallTaskCore in power_saving mode rebalance()
should fix power saving issue from #18915 Change-Id: Ie0d64445599a3f3af6b2c7f654b20e26bd4e3b8b Reviewed-on: https://review.haiku-os.org/c/haiku/+/7790 Reviewed-by: waddlesplash <[email protected]> Tested-by: Commit checker robot <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
97a29cc796
commit
61607003b1
@@ -150,8 +150,10 @@ rebalance(const ThreadData* threadData)
|
||||
sSmallTaskCore = NULL;
|
||||
CoreEntry* smallTaskCore = choose_small_task_core();
|
||||
|
||||
if (threadLoad > coreLoad / 3 || !smallTaskCore->CPUMask().Matches(mask))
|
||||
if (threadLoad > coreLoad / 3 || smallTaskCore == NULL
|
||||
|| !smallTaskCore->CPUMask().Matches(mask)) {
|
||||
return core;
|
||||
}
|
||||
return coreLoad > kVeryHighLoad ? smallTaskCore : core;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user