FreeBSD Bugzilla – Attachment 153317 Details for
Bug 197922
[patch] [sched] Remove random() from sched_ule, add short circuit for non-SMP, non-balancing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Replace random with get_cyclecount as a suitable source of entropy for the balancer. Short circuit for non-SMP/Balance
remove_random_in_balance.diff (text/plain), 656 bytes, created by
Harrison Grundy
on 2015-02-22 15:16:32 UTC
(
hide
)
Description:
Replace random with get_cyclecount as a suitable source of entropy for the balancer. Short circuit for non-SMP/Balance
Filename:
MIME Type:
Creator:
Harrison Grundy
Created:
2015-02-22 15:16:32 UTC
Size:
656 bytes
patch
obsolete
>Index: sys/kern/sched_ule.c >=================================================================== >--- sys/kern/sched_ule.c (revision 278968) >+++ sys/kern/sched_ule.c (working copy) >@@ -861,14 +861,15 @@ > { > struct tdq *tdq; > >+ if (smp_started == 0 || rebalance == 0) >+ return; >+ > /* > * Select a random time between .5 * balance_interval and > * 1.5 * balance_interval. > */ > balance_ticks = max(balance_interval / 2, 1); >- balance_ticks += random() % balance_interval; >- if (smp_started == 0 || rebalance == 0) >- return; >+ balance_ticks += get_cyclecount() % balance_interval; > tdq = TDQ_SELF(); > TDQ_UNLOCK(tdq); > sched_balance_group(cpu_top);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197922
: 153317 |
153415
|
153513
|
153514
|
153515
|
153516