Re: [PATCH] index-pack: protect deepest_delta in multithread code

2013-03-19 Thread Duy Nguyen
On Tue, Mar 19, 2013 at 8:50 PM, Thomas Rast wrote: > -- >8 -- > Subject: [PATCH] index-pack: guard nr_resolved_deltas reads by lock > > The threaded parts of index-pack increment the number of resolved > deltas in nr_resolved_deltas guarded by counter_mutex. However, the > per-thread outer loop

Re: [PATCH] index-pack: protect deepest_delta in multithread code

2013-03-19 Thread Thomas Rast
Nguyễn Thái Ngọc Duy writes: > deepest_delta is a global variable but is updated without protection > in resolve_delta(), a multithreaded function. Add a new mutex for it, > but only protect and update when it's actually used (i.e. show_stat is > non-zero). > > Another variable that will not be u

Re: [PATCH] index-pack: protect deepest_delta in multithread code

2013-03-19 Thread Jeff King
On Tue, Mar 19, 2013 at 08:01:15PM +0700, Nguyen Thai Ngoc Duy wrote: > deepest_delta is a global variable but is updated without protection > in resolve_delta(), a multithreaded function. Add a new mutex for it, > but only protect and update when it's actually used (i.e. show_stat is > non-zero).

[PATCH] index-pack: protect deepest_delta in multithread code

2013-03-19 Thread Nguyễn Thái Ngọc Duy
deepest_delta is a global variable but is updated without protection in resolve_delta(), a multithreaded function. Add a new mutex for it, but only protect and update when it's actually used (i.e. show_stat is non-zero). Another variable that will not be updated is delta_depth in "struct object_en