Re: [PATCH] basic threaded delta search
- From
Nicolas Pitre <nico@cam.org>
- Date
- Sep 7, 2007, 16:19 UTC
- Message-ID
- <alpine.LFD.0.9999.0709071211420.21186@xanadu.home>
- In-Reply-To
- <20070907061105.GA1379@auto.tuwien.ac.at>
On Fri, 7 Sep 2007, Martin Koegler wrote:
Show 16 quoted lines
> On Thu, Sep 06, 2007 at 10:48:06AM -0400, Nicolas Pitre wrote:
> > 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++;I guess you mean list[sublist_size-1]->hash == list[sublist_size]->hash. But yeah that is a good idea.
Nicolas