git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] pack-objects: Use packing_data lock instead of read_mutex

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 22, 2019, 10:25 UTC
Message-ID
<CACsJy8Cdc-AcPDRquxHu-LmHUjzHmR2GEmARbnPcwXgjp8+HMQ@mail.gmail.com>
In-Reply-To
<20190122072809.GA28975@sigill.intra.peff.net>
On Tue, Jan 22, 2019 at 2:28 PM Jeff King <peff@peff.net> wrote:
Show 21 quoted lines
>
> On Mon, Jan 21, 2019 at 05:02:33PM +0700, Duy Nguyen wrote:
>
> > > 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.
> >
> > In early iterations of these changes, I think we hit high contention
> > when sharing the mutex [1]. I don't know if we will hit the same
> > performance problem again with this patch. It would be great if Elijah
> > with his zillion core machine could test this out. Otherwise it may be
> > just safer to keep the two mutexes separate.
> >
> > [1] http://public-inbox.org/git/20180720052829.GA3852@sigill.intra.peff.net/
>
> I haven't been following this thread closely, but I still have access to
> a 40-core machine if you'd like me to time anything.
>
> It sounds like _this_ patch is the more fine-grained one. Is the more
> coarse-grained one already written?

A more fine-grained one would be 'master' where we use two separate mutexes for different code. I guess if repack performance with this patch is still the same as 'master', we're good to go. You may need to lower $GIT_TEST_OE_SIZE and $GIT_TEST_OE_DELTA_SIZE to force more lock contention.

-- 
Duy
Previous: Jeff KingNext: Patrick Hogg
Message 4 of 10 in “pack-objects: Use packing_data lock instead of read_mutex”
  1. pack-objects: Use packing_data lock instead of read_mutexPatrick Hogg, Jan 19, 2019
  2. Duy NguyenJan 21, 2019
  3. Jeff KingJan 22, 2019
  4. Duy NguyenJan 22, 2019
  5. Patrick HoggJan 22, 2019
  6. Elijah NewrenJan 22, 2019
  7. Elijah NewrenJan 22, 2019
  8. Junio C HamanoJan 22, 2019
  9. Patrick HoggJan 22, 2019
  10. Junio C HamanoJan 23, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.