Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
467f38f4
Commit
467f38f4
authored
Nov 12, 2015
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rescue LOAD_BALANCE option from bitrot
parent
e098b020
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
assign/score.cc
assign/score.cc
+4
-4
No files found.
assign/score.cc
View file @
467f38f4
...
...
@@ -1064,8 +1064,8 @@ void remove_node(vvertex vv)
#ifdef LOAD_BALANCE
// Use this tricky formula to score based on how 'full' the pnode is, so that
// we prefer to equally fill the minimum number of pnodes
SSUB
(
SCORE_PNODE
*
(
powf
(
1
+
((
pnode
->
current_load
+
1
)
*
1.0
)
/
pnode
->
max_load
,
2
)));
SADD
(
SCORE_PNODE
*
(
powf
(
1
+
pnode
->
current_load
*
1.0
/
pnode
->
max_load
,
2
)));
SSUB
(
SCORE_PNODE
*
(
powf
(
1
+
((
tr
->
get_current_load
()
+
1
)
*
1.0
)
/
tr
->
get_max_load
()
,
2
)));
SADD
(
SCORE_PNODE
*
(
powf
(
1
+
tr
->
get_current_load
()
*
1.0
/
tr
->
get_max_load
()
,
2
)));
#endif
if
(
pnode
->
total_load
==
0
)
{
// If the pnode is now free, we need to do some cleanup
...
...
@@ -1463,8 +1463,8 @@ int add_node(vvertex vv,pvertex pv, bool deterministic, bool is_fixed, bool skip
}
}
#ifdef LOAD_BALANCE
SSUB
(
SCORE_PNODE
*
(
powf
(
1
+
((
pnode
->
current_load
-
1
)
*
1.0
)
/
pnode
->
max_load
,
2
)));
SADD
(
SCORE_PNODE
*
(
powf
(
1
+
((
pnode
->
current_load
)
*
1.0
)
/
pnode
->
max_load
,
2
)));
SSUB
(
SCORE_PNODE
*
(
powf
(
1
+
((
tr
->
get_current_load
()
-
1
)
*
1.0
)
/
tr
->
get_max_load
()
,
2
)));
SADD
(
SCORE_PNODE
*
(
powf
(
1
+
((
tr
->
get_current_load
())
*
1.0
)
/
tr
->
get_max_load
()
,
2
)));
#endif
// node no longer unassigned
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment