diff mbox series

fixup! index-pack: make quantum of work smaller

Message ID 20200824212751.3907181-1-jonathantanmy@google.com (mailing list archive)
State New, archived
Headers show
Series fixup! index-pack: make quantum of work smaller | expand

Commit Message

Jonathan Tan Aug. 24, 2020, 9:27 p.m. UTC
---
> 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 mbox series

Patch

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;