From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: [PATCH 0/2] For improved pack locality Date: Thu, 7 Jul 2011 17:24:15 -0700 Message-ID: <1310084657-16790-1-git-send-email-gitster@pobox.com> Cc: "Shawn O. Pearce" To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Fri Jul 08 02:24:27 2011 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qeyrp-0000QC-As for gcvg-git-2@lo.gmane.org; Fri, 08 Jul 2011 02:24:25 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752278Ab1GHAYU (ORCPT ); Thu, 7 Jul 2011 20:24:20 -0400 Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:48485 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943Ab1GHAYU (ORCPT ); Thu, 7 Jul 2011 20:24:20 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 5F7336582; Thu, 7 Jul 2011 20:24:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id; s=sasl; bh=ZTp5vaUkm4p00dvxt2bjXD/SXwU =; b=yM+8hR19AOtCL/gJkHGsatfDzGv5FtId8Qxp5FIt04fq9V55Dn/LpTeuO/j Rfs75h/DZEHs7+hAGN40qP2LXGCBMNRF+zKYNfdxOyMmtsczen3UppAf71FF7n3C 97pQEdvMPSv4fuOARtQRxbIYj5MHQ849c6ruOcJIfi8IvktA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id; q=dns; s=sasl; b=vL90NyrAsL/7dzAQCLpu7 aooZkgfo4G30BEDtRpCCHdcZolPpId38s2m6/xfQj3AHongP5NX12uRUKhbV7Nql CPYqMgc2j+GqabljwohUItcrz2+05PoZFWmDBnSsuTsXvmDcsJU1vvs2aMSj5znM GimgAa0aONvqhjs45lrrqo= Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 57CED6581; Thu, 7 Jul 2011 20:24:19 -0400 (EDT) Received: from pobox.com (unknown [76.102.170.102]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id BB8DB6580; Thu, 7 Jul 2011 20:24:18 -0400 (EDT) X-Mailer: git-send-email 1.7.6.134.gcf13f6 X-Pobox-Relay-ID: 9EA02A72-A8F8-11E0-B11D-5875C023C68D-77302942!a-pb-sasl-sd.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Shawn kept bugging me about the locality of data in the packfiles generated by C-git (see pack-heuristics.txt in Documentation/technical) is often horrible, so here is my stab at it. The idea is to make sure that the majority of pack accesses fall to nearby locations in the mmapped packfile to reduce minor faults (which would help if you are accessing the packfile over slow link like NFS, or starting from a cold cache). Junio C Hamano (2): core: log offset pack data accesses happened pack-objects: optimize "recency order" builtin/pack-objects.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++- cache.h | 3 + config.c | 3 + environment.c | 1 + sha1_file.c | 21 +++++++ 5 files changed, 165 insertions(+), 1 deletions(-) -- 1.7.6.134.gcf13f6