[PATCH] fixup! index-pack: make quantum of work smaller
- From
- Jonathan Tan <jonathantanmy@google.com>
- Date
- Aug 24, 2020, 21:27 UTC
- Message-ID
- <20200824212751.3907181-1-jonathantanmy@google.com>
- In-Reply-To
- <cover.1598296530.git.jonathantanmy@google.com>
---
> Josh did not list > out specific improvements to commit messages but I have taken his > suggestions for comments.
...and somehow I forgot to commit them before sending out this patch set, so here they are.
builtin/index-pack.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 0a5b938e1e..4fa9127c35 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -62,6 +62,8 @@ struct base_data { * Stack of struct base_data that have unprocessed children. * threaded_second_pass() uses this as a source of work (the other being the * objects array). + * + * Guarded by work_mutex. */ LIST_HEAD(work_head); @@ -70,11 +72,16 @@ LIST_HEAD(work_head); * processed or are being processed, and at least one child is being processed. * These struct base_data must be kept around until the last child is * processed. + * + * Guarded by work_mutex. */ LIST_HEAD(done_head); /* * All threads share one delta base cache. + * + * base_cache_used is guarded by work_mutex, and base_cache_limit is read-only + * in a thread. */ size_t base_cache_used; size_t base_cache_limit;
-- 2.28.0.297.g1956fa8f8d-goog