Re: [PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-20 Thread David Turner
On Wed, 2016-04-20 at 16:26 +0700, Duy Nguyen wrote: > On Wed, Apr 20, 2016 at 6:27 AM, David Turner < > dtur...@twopensource.com> wrote: > > From: Nguyễn Thái Ngọc Duy > > > > Later, we will introduce git index-helper to share this memory with > > other git processes. > > >

Re: [PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-20 Thread David Turner
On Wed, 2016-04-20 at 11:01 +0200, Johannes Schindelin wrote: > Hi Dave, > > On Tue, 19 Apr 2016, David Turner wrote: > > > unmap: > > + istate->mmap = NULL; > > munmap(mmap, mmap_size); > > die("index file corrupt"); > > } > > [...] > > @@ -1698,6 +1705,10 @@ int

Re: [PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-20 Thread Duy Nguyen
On Wed, Apr 20, 2016 at 6:27 AM, David Turner wrote: > From: Nguyễn Thái Ngọc Duy > > Later, we will introduce git index-helper to share this memory with > other git processes. > > Since the memory will be shared, it will never be unmapped (although >

Re: [PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-20 Thread Johannes Schindelin
Hi Dave, On Tue, 19 Apr 2016, David Turner wrote: > unmap: > + istate->mmap = NULL; > munmap(mmap, mmap_size); > die("index file corrupt"); > } > [...] > @@ -1698,6 +1705,10 @@ int discard_index(struct index_state *istate) > free(istate->cache); > istate->cache =

[PATCH v5 02/15] read-cache: allow to keep mmap'd memory after reading

2016-04-19 Thread David Turner
From: Nguyễn Thái Ngọc Duy Later, we will introduce git index-helper to share this memory with other git processes. Since the memory will be shared, it will never be unmapped (although the kernel may of course choose to page it out). Signed-off-by: Nguyễn Thái Ngọc Duy