Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread David Turner
On Mon, 2014-07-28 at 19:03 +0700, Nguyễn Thái Ngọc Duy wrote: > +# Define HAVE_SHM if you platform support shm_* functions in librt. s/you/your/ > +static void free_index_shm(struct index_shm *is) Does not actually free its argument; should be release_index_shm. -- To unsubscribe from this

Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread Duy Nguyen
On Wed, Jul 30, 2014 at 3:08 PM, Eric Sunshine wrote: >> +static void share_index(struct index_state *istate, struct index_shm *is) >> +{ >> + void *new_mmap; >> + if (istate->mmap_size <= 20 || >> + hashcmp(istate->sha1, >> + (unsigned char *)istate->mmap +

Re: [PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-30 Thread Eric Sunshine
On Monday, July 28, 2014, Nguyễn Thái Ngọc Duy wrote: > Instead of reading the index from disk and worrying about disk > corruption, the index is cached in memory (memory bit-flips happen > too, but hopefully less often). The result is faster read. > > The biggest gain is not having to verify the

[PATCH v3 4/9] index-helper: new daemon for caching index and related stuff

2014-07-28 Thread Nguyễn Thái Ngọc Duy
Instead of reading the index from disk and worrying about disk corruption, the index is cached in memory (memory bit-flips happen too, but hopefully less often). The result is faster read. The biggest gain is not having to verify the trailing SHA-1, which takes lots of time especially on large ind