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

Re: [PATCH] basic threaded delta search

From
MKMartin Koegler <mkoegler@auto.tuwien.ac.at>
Date
Sep 7, 2007, 06:11 UTC
Message-ID
<20070907061105.GA1379@auto.tuwien.ac.at>
In-Reply-To
<alpine.LFD.0.9999.0709061014280.21186@xanadu.home>
On Thu, Sep 06, 2007 at 10:48:06AM -0400, Nicolas Pitre wrote:
Show 5 quoted lines
> On Thu, 6 Sep 2007, Junio C Hamano wrote:
> > Also how would this interact with the LRU
> > delta base window we discussed a week or two ago?
> 
> This is completely orthogonal.

Maybe we should adjust the split point of the the object list so, that objects with the same name hash are processed by one thread, as the LRU could provide the most benefit for these objects.

I think of something like (totally untested):
        for (i = 0; i < NR_THREADS; i++) {
                unsigned sublist_size = list_size / (NR_THREADS - i);
+		while (sublist_size < list_size && list[0]->hash == list[1]->hash)
+			sublist_size++;
                p[i].list = list;
                p[i].list_size = sublist_size;
                p[i].window = window;
                p[i].depth = depth;
                p[i].processed = processed;
                ret = pthread_create(&p[i].thread, NULL,
                                     threaded_find_deltas, &p[i]);
                if (ret)
                        die("unable to create thread: %s", strerror(ret));
                list += sublist_size;
                list_size -= sublist_size;
        }
mfg Martin Kögler
Previous: Nicolas PitreNext: Nicolas Pitre
Message 9 of 10 in “straighten the list of objects to deltify”
  1. straighten the list of objects to deltifyNicolas Pitre, Sep 6, 2007
  2. localize window memory usage accountingNicolas Pitre, Sep 6, 2007
  3. rearrange delta search progress reportingNicolas Pitre, Sep 6, 2007
  4. basic threaded delta searchNicolas Pitre, Sep 6, 2007
  5. David KastrupSep 6, 2007
  6. Nicolas PitreSep 6, 2007
  7. Junio C HamanoSep 6, 2007
  8. Nicolas PitreSep 6, 2007
  9. Martin KoeglerSep 7, 2007
  10. Nicolas PitreSep 7, 2007

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.