diff options
author | Nicolas Pitre <nico@cam.org> | 2007-12-08 00:03:17 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-08 03:38:36 -0800 |
commit | 384b32c09b3c7e36b4d65ae80fc758d75dba3fc2 (patch) | |
tree | bda0943e89f8734e3c9435798f1d17deeb43065f /parse-options.c | |
parent | b904166ccb67d80491fad9d4f5ec42d241975f37 (diff) | |
download | git-384b32c09b3c7e36b4d65ae80fc758d75dba3fc2.tar.gz |
pack-objects: fix threaded load balancing
The current method consists of a master thread serving chunks of objects
to work threads when they're done with their previous chunk. The issue
is to determine the best chunk size: making it too large creates poor
load balancing, while making it too small has a negative effect on pack
size because of the increased number of chunk boundaries and poor delta
window utilization.
This patch implements a completely different approach by initially
splitting the work in large chunks uniformly amongst all threads, and
whenever a thread is done then it steals half of the remaining work from
another thread with the largest amount of unprocessed objects.
This has the advantage of greatly reducing the number of chunk boundaries
with an almost perfect load balancing.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
0 files changed, 0 insertions, 0 deletions