Duy Nguyen writes:
> We don't hold this memory forever though. If the daemon is idle for a
> while, it exits, releasing memory back to system. And not using
> mlock() already gives the OS more freedom in memory usage.
Yup, that is why I suspected you wanted to use something other than
mlock().
-
On Fri, Apr 15, 2016 at 1:12 AM, Junio C Hamano wrote:
> Duy Nguyen writes:
>
>> On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano wrote:
> - access is slow (unless cached, but we can't be sure)
We could solve this (and the other problem) with mlock.
>>>
>>> Probably you meant madvi
On Thu, 2016-04-14 at 11:12 -0700, Junio C Hamano wrote:
> Duy Nguyen writes:
>
> > On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano
> > wrote:
> > > > > - access is slow (unless cached, but we can't be sure)
> > > >
> > > > We could solve this (and the other problem) with mlock.
> > >
> > > P
Duy Nguyen writes:
> On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano wrote:
- access is slow (unless cached, but we can't be sure)
>>>
>>> We could solve this (and the other problem) with mlock.
>>
>> Probably you meant madvise(2)?
>>
>> For something of a size comparable to the index file
On Wed, Apr 13, 2016 at 1:05 AM, Junio C Hamano wrote:
>>> - access is slow (unless cached, but we can't be sure)
>>
>> We could solve this (and the other problem) with mlock.
>
> Probably you meant madvise(2)?
>
> For something of a size comparable to the index file held by
> index-helper-daemon
On Tue, 2016-04-12 at 11:05 -0700, Junio C Hamano wrote:
> > > - access is slow (unless cached, but we can't be sure)
> >
> > We could solve this (and the other problem) with mlock.
>
> Probably you meant madvise(2)?
>
> For something of a size comparable to the index file held by
> index-helpe
David Turner writes:
>> I avoided actual files for two reasons
>>
>> - disk error rate is higher than memory one, and we might need
>> trailing SHA-1 back
>
> This only matters if we ever *read* the mmap off disk. But that will
> rarely happen -- usually, everything will stay in memory.
True,
On Tue, 2016-04-12 at 16:40 +0700, Duy Nguyen wrote:
> On Tue, Apr 12, 2016 at 6:27 AM, David Turner <
> dtur...@twopensource.com> wrote:
> > On Fri, 2016-04-08 at 18:16 -0400, David Turner wrote:
> > > And SHM on Macs works a bit differently than on Linux in at least
> > > two
> > > irritating way
On Tue, Apr 12, 2016 at 6:27 AM, David Turner wrote:
> On Fri, 2016-04-08 at 18:16 -0400, David Turner wrote:
>> And SHM on Macs works a bit differently than on Linux in at least two
>> irritating ways.
>>
>> So, uh, new version to come once I actually make it work on Mac.
>> Probably Monday.
>
>
On Fri, 2016-04-08 at 18:16 -0400, David Turner wrote:
> And SHM on Macs works a bit differently than on Linux in at least two
> irritating ways.
>
> So, uh, new version to come once I actually make it work on Mac.
> Probably Monday.
I was chatting with a friend about this and he mentioned that
On Fri, 2016-04-08 at 18:26 +0700, Duy Nguyen wrote:
> On Thu, Apr 7, 2016 at 5:11 AM, David Turner <
> dtur...@twopensource.com> wrote:
> > @@ -1045,4 +1046,21 @@ struct tm *git_gmtime_r(const time_t *,
> > struct tm *);
> > #define getc_unlocked(fh) getc(fh)
> > #endif
> >
> > +#ifdef __linux_
Hi David,
On Thu, 7 Apr 2016, David Turner wrote:
> On Thu, 2016-04-07 at 16:14 +0200, Johannes Schindelin wrote:
> >
> > On Thu, 7 Apr 2016, Johannes Sixt wrote:
> >
> > > Am 07.04.2016 um 00:11 schrieb David Turner:
> > > > +static void share_index(struct index_state *istate, struct shm
> > >
On Thu, Apr 7, 2016 at 5:11 AM, David Turner wrote:
> @@ -1045,4 +1046,21 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
> #define getc_unlocked(fh) getc(fh)
> #endif
>
> +#ifdef __linux__
> +#define UNIX_PATH_MAX 108
> +#elif defined(__APPLE__) || defined(BSD)
> +#define UNIX_PATH_MAX
On Thu, 2016-04-07 at 16:14 +0200, Johannes Schindelin wrote:
> Hi,
>
> On Thu, 7 Apr 2016, Johannes Sixt wrote:
>
> > Am 07.04.2016 um 00:11 schrieb David Turner:
> > > +static void share_index(struct index_state *istate, struct shm
> > > *is)
> > > +{
> > > + void *new_mmap;
> > > + if (istate-
Hi,
On Thu, 7 Apr 2016, Johannes Sixt wrote:
> Am 07.04.2016 um 00:11 schrieb David Turner:
> > +static void share_index(struct index_state *istate, struct shm *is)
> > +{
> > + void *new_mmap;
> > + if (istate->mmap_size <= 20 ||
> > + hashcmp(istate->sha1,
> > + (unsigne
Am 07.04.2016 um 00:11 schrieb David Turner:
+static void share_index(struct index_state *istate, struct shm *is)
+{
+ void *new_mmap;
+ if (istate->mmap_size <= 20 ||
+ hashcmp(istate->sha1,
+ (unsigned char *)istate->mmap + istate->mmap_size - 20) ||
+
16 matches
Mail list logo