Re: [PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-26 Thread Johannes Sixt
Am 22.07.2018 um 10:04 schrieb Nguyễn Thái Ngọc Duy: + if (size < pack->oe_delta_size_limit) { + e->delta_size_ = size; + e->delta_size_valid = 1; + } else { + packing_data_lock(pack); + if (!pack->delta_size) +

Re: [PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-23 Thread Jeff King
On Mon, Jul 23, 2018 at 08:49:59PM +0200, Duy Nguyen wrote: > On Mon, Jul 23, 2018 at 8:38 PM Duy Nguyen wrote: > > I will have to study the thread dispatch code more to have a better > > answer, unfortunately. > > Well.. I thought I would need this weekend for this, but a quick look > and

Re: [PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-23 Thread Duy Nguyen
On Mon, Jul 23, 2018 at 8:38 PM Duy Nguyen wrote: > I will have to study the thread dispatch code more to have a better > answer, unfortunately. Well.. I thought I would need this weekend for this, but a quick look and ll_find_deltas() suggests that what we're doing is safe. At least you and

Re: [PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-23 Thread Duy Nguyen
On Mon, Jul 23, 2018 at 8:04 PM Junio C Hamano wrote: > > Nguyễn Thái Ngọc Duy writes: > > > Access to e->delta_size_ (and by extension > > pack->delta_size[e - pack->objects]) is unprotected as before, the > > thread scheduler in pack-objects must make sure "e" is never updated > > by two

Re: [PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-23 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Access to e->delta_size_ (and by extension > pack->delta_size[e - pack->objects]) is unprotected as before, the > thread scheduler in pack-objects must make sure "e" is never updated > by two different threads. OK. Do we need to worry about "e" (e.g.

[PATCH v2] pack-objects: fix performance issues on packing large deltas

2018-07-22 Thread Nguyễn Thái Ngọc Duy
Let's start with some background about oe_delta_size() and oe_set_delta_size(). If you already know, skip the next paragraph. These two are added in 0aca34e826 (pack-objects: shrink delta_size field in struct object_entry - 2018-04-14) to help reduce 'struct object_entry' size. The delta size