git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Hogg <phogg@novamoon.net>
Cc: git@vger.kernel.org, pclouds@gmail.com, Johannes.Schindelin@gmx.de
Subject: Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex
Date: Tue, 22 Jan 2019 14:43:33 -0800	[thread overview]
Message-ID: <xmqq1s54e2ju.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20190119154337.6556-1-phogg@novamoon.net> (Patrick Hogg's message of "Sat, 19 Jan 2019 10:43:38 -0500")

Patrick Hogg <phogg@novamoon.net> 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 comment on this to show preference between the two
approaches.

> I also removed the #ifndef NO_PTHREADS in prepare_packing_data around
> the initialization of &pdata->lock since I had to upgrade the lock to
> a recursive mutex. As far as I can tell init_recursive_mutex (and
> pthread_mutex_init for that matter) have that protection already so it
> appears to be redundant.

If you can defer "I also" to a separate patch, please do so.
Keeping the fix alone as small as possible and not tangled with
other changes would make it easier for people to cherry-pick the fix
to older maintenance tracks if they choose to.

  parent reply	other threads:[~2019-01-22 22:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19 15:43 [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex Patrick Hogg
2019-01-21 10:02 ` Duy Nguyen
2019-01-22  7:28   ` Jeff King
2019-01-22 10:25     ` Duy Nguyen
2019-01-22 13:13       ` Patrick Hogg
2019-01-22 17:52   ` Elijah Newren
2019-01-22 20:37     ` Elijah Newren
2019-01-22 22:43 ` Junio C Hamano [this message]
2019-01-22 23:54   ` Patrick Hogg
2019-01-23 17:51     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1s54e2ju.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pclouds@gmail.com \
    --cc=phogg@novamoon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).