Redo work load computation
The simplistic approach has a race condition. This works for now, albeit still issuing too much work.
This commit is contained in:
parent
be507c0e13
commit
380a4f9cfc
1 changed files with 1 additions and 1 deletions
|
@ -565,7 +565,7 @@ do_step(StepFrom, HowMuch, State) ->
|
||||||
WorkLeftHere = 0
|
WorkLeftHere = 0
|
||||||
end,
|
end,
|
||||||
WorkToDoHere = min(WorkLeftHere, HowMuch),
|
WorkToDoHere = min(WorkLeftHere, HowMuch),
|
||||||
DelegateWork = max(0,HowMuch - max(?BTREE_SIZE(?TOP_LEVEL), WorkToDoHere)),
|
DelegateWork = max(0,HowMuch - WorkToDoHere),
|
||||||
|
|
||||||
?log("step:~p, do:~p, left:~p ~n", [HowMuch, WorkToDoHere, WorkLeftHere]),
|
?log("step:~p, do:~p, left:~p ~n", [HowMuch, WorkToDoHere, WorkLeftHere]),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue