git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH 0/17] Sliding window mmap for packfiles.
Date: Sat, 23 Dec 2006 02:33:17 -0500	[thread overview]
Message-ID: <20061223073317.GA9837@spearce.org> (raw)

This 17 patch series implements my much discussed, but never produced
(until now), 'mmap sliding window' for packfile data access.

The key idea behind this topic is to mmap large non-contiguous
segments of a packfile rather than the entire file.  If available
virtual memory is getting low we unmap the least recently used
packfile segment to free up address space for the currently needed
segment.

This series also permits accessing packfiles up to 4 GiB in size,
even on systems which permit only 2 GiB of virtual memory within
a single process (e.g. Windows and some older UNIXes).  Of course
4 GiB is still the upper limit on packfile size due to the current
format of the index file.

This series is 'pu' ready, but it may be too early to bring it
directly into 'next'.

Patch summary
-------------

  1 - Replace unpack_entry_gently with unpack_entry.
  2 - Introduce new config option for mmap limit.
  3 - Refactor packed_git to prepare for sliding mmap windows.
  4 - Use off_t for index and pack file lengths.
  5 - Create read_or_die utility routine.
  6 - Refactor how we open pack files to prepare for multiple windows.

    Most of the above changes are incremental refactorings to help
    get the code in a state where we can start to implement and make
    use of the struct pack_window concept this series introduces.

  7 - Replace use_packed_git with window cursors.
  8 - Loop over pack_windows when inflating/accessing data.
  9 - Document why header parsing won't exceed a window.
 10 - Unmap individual windows rather than entire files.
 11 - Fully activate the sliding window pack access.

    These commits actually implement the core of the mmap sliding
    window implementation and the necessary garbage collection to
    support unmapping the least recently used window.

 12 - Load core configuration in git-verify-pack.
 13 - Ensure core.packedGitWindowSize cannot be less than 2 pages.
 14 - Improve error message when packfile mmap fails.
 15 - Support unmapping windows on 'temporary' packfiles.

    The above sequence of commits are bug fixes on top of the initial
    commits.  I did not fold these back into the earlier commits
    as I felt the bug fix commit messages provided useful details.

 16 - Create pack_report() as a debugging aid.
 17 - Test suite for sliding window mmap implementation.

    These provide debugging and testing tools.

             reply	other threads:[~2006-12-23  7:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-23  7:33 Shawn O. Pearce [this message]
2006-12-23  9:37 ` [PATCH 0/17] Sliding window mmap for packfiles Junio C Hamano
2006-12-23  9:42   ` Shawn Pearce
2006-12-24  8:56 ` Francis Moreau
2006-12-24  9:05   ` Shawn Pearce
2006-12-24  9:36     ` Francis Moreau
2006-12-24  9:49       ` Shawn Pearce
2007-01-02 15:28         ` Andy Whitcroft
2006-12-24  9:29   ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061223073317.GA9837@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).