[PATCH] fixup! index-pack: make quantum of work smaller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
> 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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux