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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 20, 2016 at 6:27 AM, David Turner <dturner@xxxxxxxxxxxxxxxx> wrote:
> From: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
>
> 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).

This is not entirely true. We do need to keep the mmap'd memory for
longer, even after read_index_from() finishes. But we do not share the
exact same address space to other processes (memcpy is used in
index-helper.c:share_index()). We could even discard_index() at the
end of share_index(), but I think we keep it anyway just in case
another process asks, or when index is not updated.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]