Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-23 Thread Junio C Hamano
Patrick Hogg writes: > On Tue, Jan 22, 2019 at 5:43 PM Junio C Hamano wrote: >> >> Patrick Hogg writes: >> >> > As I mentioned in the prior thread I think that it will be simpler >> > to simply use the existing lock in packing_data instead of moving >> > read_mutex. I can go back to simply movi

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Patrick Hogg
On Tue, Jan 22, 2019 at 5:43 PM Junio C Hamano wrote: > > Patrick Hogg writes: > > > As I mentioned in the prior thread I think that it will be simpler > > to simply use the existing lock in packing_data instead of moving > > read_mutex. I can go back to simply moving read_mutex to the > > packin

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Junio C Hamano
Patrick Hogg writes: > As I mentioned in the prior thread I think that it will be simpler > to simply use the existing lock in packing_data instead of moving > read_mutex. I can go back to simply moving read_mutex to the > packing_data struct if that that is preferable, though. I'll let others c

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Elijah Newren
Duy, Patrick, On Tue, Jan 22, 2019 at 9:52 AM Elijah Newren wrote: > > On Mon, Jan 21, 2019 at 2:02 AM Duy Nguyen wrote: > > > > On Sat, Jan 19, 2019 at 10:45 PM Patrick Hogg wrote: > > > > > > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > > > 2018-04-14) added an extra

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Elijah Newren
On Mon, Jan 21, 2019 at 2:02 AM Duy Nguyen wrote: > > On Sat, Jan 19, 2019 at 10:45 PM Patrick Hogg wrote: > > > > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > > 2018-04-14) added an extra usage of read_lock/read_unlock in the newly > > introduced oe_get_size_slow for th

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Patrick Hogg
On Tue, Jan 22, 2019 at 5:26 AM Duy Nguyen wrote: > > On Tue, Jan 22, 2019 at 2:28 PM Jeff King wrote: > > > > On Mon, Jan 21, 2019 at 05:02:33PM +0700, Duy Nguyen wrote: > > > > > > As I mentioned in the prior thread I think that it will be simpler > > > > to simply use the existing lock in pack

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-22 Thread Duy Nguyen
On Tue, Jan 22, 2019 at 2:28 PM Jeff King wrote: > > On Mon, Jan 21, 2019 at 05:02:33PM +0700, Duy Nguyen wrote: > > > > As I mentioned in the prior thread I think that it will be simpler > > > to simply use the existing lock in packing_data instead of moving > > > read_mutex. I can go back to sim

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-21 Thread Jeff King
On Mon, Jan 21, 2019 at 05:02:33PM +0700, Duy Nguyen wrote: > > As I mentioned in the prior thread I think that it will be simpler > > to simply use the existing lock in packing_data instead of moving > > read_mutex. I can go back to simply moving read_mutex to the > > packing_data struct if that

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-21 Thread Duy Nguyen
On Sat, Jan 19, 2019 at 10:45 PM Patrick Hogg wrote: > > ac77d0c37 ("pack-objects: shrink size field in struct object_entry", > 2018-04-14) added an extra usage of read_lock/read_unlock in the newly > introduced oe_get_size_slow for thread safety in parallel calls to > try_delta(). Unfortunately o

[PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

2019-01-19 Thread Patrick Hogg
ac77d0c37 ("pack-objects: shrink size field in struct object_entry", 2018-04-14) added an extra usage of read_lock/read_unlock in the newly introduced oe_get_size_slow for thread safety in parallel calls to try_delta(). Unfortunately oe_get_size_slow is also used in serial code, some of which is ca