hrev52094 adds 1 changeset to branch 'master'
old head: a052f4807f90e41eb8029a270541420d57f95ef9
new head: 3142fb6996948dd5e539ddcb56b0b81fe223cd26
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=3142fb699694+%5Ea052f4807f90
----------------------------------------------------------------------------
3142fb699694: scheduler: Fix setting priorities following the penalty
cancellation changes.
Before hrev46809, the "thread->priority = priority" line was below this
check, and so all was well. But that commit moved the line to its present
location, which means ever since then, the following code which updates
CPU entries, scheduler listeners, etc. has never been run.
On my VMware instance (which is probably pretty affected by the host system
and thus not the greatest performance test), "time jam -j2 HaikuDepot"
decreased
from 46.0s real to 43.3s real, 52.3s user to 48.1s user, 12.1s sys to 12.2s
sys.
So this seems to make some sort of impact.
Spotted by Fishpond in #10454 and confirmed by korli, but somehow neither of
them followed up on that in the 4.5 years since...
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev52094
Commit: 3142fb6996948dd5e539ddcb56b0b81fe223cd26
URL: https://git.haiku-os.org/haiku/commit/?id=3142fb699694
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Thu Jul 12 01:53:44 2018 UTC
Ticket: https://dev.haiku-os.org/ticket/10454
----------------------------------------------------------------------------
1 file changed, 2 insertions(+), 2 deletions(-)
src/system/kernel/scheduler/scheduler.cpp | 4 ++--
----------------------------------------------------------------------------
diff --git a/src/system/kernel/scheduler/scheduler.cpp
b/src/system/kernel/scheduler/scheduler.cpp
index 27022e371c..f7fca91256 100644
--- a/src/system/kernel/scheduler/scheduler.cpp
+++ b/src/system/kernel/scheduler/scheduler.cpp
@@ -184,8 +184,8 @@ scheduler_set_thread_priority(Thread *thread, int32
priority)
thread->priority = priority;
threadData->CancelPenalty();
- if (priority == thread->priority)
- return thread->priority;
+ if (priority == oldPriority)
+ return oldPriority;
if (thread->state != B_THREAD_READY) {
if (thread->state == B_THREAD_RUNNING) {