From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=103.168.172.154 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796202662; b=sdRdfuYTiY5oTBXaODcrVS/3EjuxMkezfqyuHP2p1evpH7uGxC64OMdyyVXMKZuDt1ws FVAbhF/OpHXHSr5th3FIr2qV2AAclFf5ifOlXCNEFSbnYBLnqFjmPB6sHozAcnXX8etS4 /0wy8nw0gN+X8PInhjDVJ0erTNCokn1OpukyHpRfTTul6OSvMdNnf9IgJoD3nLjNdCv07 OPLdTSm4kNdqeV+xej6j/Uj2wDJEoJ+9AZRRWhSfXJ/weRzR7ltyvlezl7ARKj67vIYUP jJlAJFry+HaKuruJD6x6ehvSoLMQdUbOVeWEyz9TVUPviX4LH+iRefv9t2kNhNA4JHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796202662; h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature: X-DKIM2-Info:DKIM2-Signature:X-DKIM2-Info:Message-Instance: X-ME-Sender:X-ME-Received:X-ME-Proxy-Cause:X-ME-Proxy:Feedback-ID: Received:Received:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=IvZX6FSQVcfepVbdzNSmPqm/tFLBzCgTn2qsE6gOAPQ=; b=FLJso3GQ/NkwgsyKxJ3eigRQ/RcOzZtfG/GLhCltGxDT/puEfvoqb6ISwyg5ZzBAanaU rasQjPS9FAd25WKcYYwt8Rt/EA4zA0IwygVzHx8TS7mpzd0Wpz+xqtcjsdJ+7cutfAVUe IFkUNd656358MhR3P7ZeVsZfGbyNGW9vYMhNdA/qR1BkoVZpAAX1yCbrUk9BiMu0curAK qD2kRZF/4bOpRe2AfRoEdiyyd1Z18knPxhLwlQDWgFcXl3f+C0lt5tbYazZ3WgPKxWQDp m3yMtm8EOW3l1N4MeKJFZiq9LJcDK8YV3rRPltkuf0BIxTLZl5048zdR+TY5mZ9vMOw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=Gybqak3j; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=If5zmFfq; arc=none smtp.remote-ip=103.168.172.154 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CB8E606A329 for ; Wed, 2 Dec 2026 09:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3CB8E606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=pks.im header.i=@pks.im header.a=rsa-sha256 header.s=fm3 header.b=Gybqak3j; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=If5zmFfq Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 5CECE14001C7 for ; Wed, 2 Dec 2026 04:11:01 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Wed, 02 Dec 2026 04:11:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1796202661; x=1796289061; bh=IvZX6FSQVc fepVbdzNSmPqm/tFLBzCgTn2qsE6gOAPQ=; b=Gybqak3jpBJG3JJkyeAojwVNC9 kO7i+t8M5P+dVxraGGDv7ex2oKdIX/aygdUBJMsaT9/bdNxj0xemyOtWJGbOdx/X 9K3M5V/vh1gQqCtPYB7EWIJesv3kgCFj0KOy1vphbwzc201lJ7rXkcu4NMhbnxQ1 G+JfONbNWo7QvqmYwhHBmSW/SXtwiUDGX3tQmDekBkFjDBDMvOExGTQee65tqImv 2f9CpWLTcZznLfN7X5Q9GYI/4iWrmpI6xemoYj+97qzZF/BWekQ8j5seIEpqUE6T 6pv3W57tPWioRtNsm5kyQGcbpdZgHZmj11DQnz0H8rr+ed+LDEpCuc0YwGxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1796202661; x=1796289061; bh=IvZX6FSQVcfepVbdzNSmPqm/tFLBzCgTn2q sE6gOAPQ=; b=If5zmFfqhtbnQzGEnQRljZJUwlhI1D9c33OsYEPRPDyvRSuu9yb rQC6AvsmUXddlxifERbq1kBidgOECnklDoHvXjzpVXIaavVyWDvKEo7wh/+JDiNr kq0qMYBEonuHeJXC3D7NWhXDOp1xiSVy3gfIbwStdjZB4GFkYuUr+rlEv5CEpJF0 75rBlbQc7MnRqVyCeELRRQwsddUkoSdHGjY0pUrllbJtT0ZS1L7ZDN5KgpNQwmXb U/1P7y0VkkaTHSGPf43JFR+4aH6zEBW4If/EjGoj/9bU/zj0ABoGmd5CVPyLCDTI bcmIZGQ782ogItNEMatVMjV/n3NTVK8LNdA== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=sign d=pks.im a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1796202661; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:symvkiGibOefeUtJVnmbBbrTvlVgNLmXSa1NT8XoC0qKfHf PYzeiWCvQsJ4G0HsNYtz4x+RF5v49dG7beEDR/v3R5yHE8rsFSLMj+VUk4zKc5Ac 3YjVIl7W7u7DqxgA4m1YeHw2iaTDO2py9HxGuJj1SWLmNPcdg5YkhbpxexF2MXyj pcwQ0AHiRTM75lVSNp6nlUsxVq250ZTfDoXNY5i0QavNFQ4b+YELFjH/TxwNNJdU NlhUi0eXi2aJoBjNziNXUDqrH9m8rIIqz7i9U9pXO4jLlDBEGXE6+sDjoEgOOEjE YxF/g2qAalsM6k6VLI3GIq4coAlPIBav46VzNxQ==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-09; repo=github.com/dkim2wg/interop; date=2026-11-03; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:ZQogTkltQp5rIl/3RMFYR+z8oXzbHnpJTc6A5Fqb7Mo=:TwhHcn2mjJUkzNPtoT3N+jQ8RwCgs7RDTrJd7jGZmkc=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTGOrsi6j1hLNJvEyBdx2sM0mZXgj8pA/s7LH9RTWoPTn7KA3vMUv8uz4KVu5xfx1c etHcFs3F3MtwlqLEt2k0PTMdWfl73VYGT1pz0ti0EMAizOHmdZX1aoBuqYVynIccB5kZh8 GEoXVgKWDH5kz134GfFdKaY4yKBJ7/4CjON5ughRFB9NzFGDmIrclCIoXKbmKneibBv6le eirf3qodI/DGz4KcuYCCC/aNtE/BRc68gUsY99T3OgZYEglSoSAK+oSg/ewL5VEgoO0Z96 rV+Zm3Y3O7NYb23pmgN6iCc5GUWBUWHbhPvVUPjExAkk5P9+J3a9jshPgc4KBksjsG5vTP g99CWBk6IQvzwwVDvspaJRFDJGFK2cX3OnRaIEJXU4KP28m+zsNuXcn81Fi8YZ2ddZ4FVu VqffityRFzPMzsAvECUxugDdt0dM2Hx7yz9C0Vz9/LQB45nHkf8ig8KSj02+z7gxhSAa5t my+oMCOsmkHg33lywk6Jcd8hq+2PbntPlIuvkeESeRHG6ge37MMZ8UNOi5L9zz0WVAyMcJ GCmBcDARXKgj+z0t025z31R6AOPVbs0rCbkZ/B4LHLdY0u2xyX1c6JMfa+a/LXlKVGwUGL t9qZaZGqelhO05lv6TqJyThYQpg1BTsEmPAqr1H+MumycS3XWcP5rNKLf7Qw X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Dec 2026 04:11:00 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id 1cdd7a04 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 2 Dec 2026 09:10:59 +0000 (UTC) Date: Wed, 2 Dec 2026 10:10:56 +0100 From: Patrick Steinhardt To: Junio C Hamano Cc: Toon Claes , git@vger.kernel.org Subject: Re: [PATCH 6/6] packfile: skip closing packs marked as do-not-close Message-ID: References: <20261120-pks-packfile-global-statistics-v1-0-19beb83b145f@pks.im> <20261120-pks-packfile-global-statistics-v1-6-19beb83b145f@pks.im> <874id3sjfj.fsf@dev.null.iotcl.com.invalid> X-Mailing-List: git@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Dec 02, 2026 at 09:38:45AM +0100, Patrick Steinhardt wrote: > On Thu, Nov 26, 2026 at 11:56:28AM -0800, Junio C Hamano wrote: > > Toon Claes writes: > > > > > Junio C Hamano writes: > > > > > >> Patrick Steinhardt writes: > > >> > > >>> When closing a packfile to maintain the maximum number of open packs we > > >>> completely ignore the `do_not_close` bit. That bit is only set by > > >>> git-fast-import(1), and as that command allocates its packs manually it > > >>> wouldn't add those packs to the list of all packfiles, and consequently > > >>> we won't ever try to close such a packfile via `close_one_pack()`. But > > >>> that feels like coincidence rather than proper design, and the result is > > >>> rather fragile. > > >>> > > >>> Skip over packfiles marked as do-not-close to reduce the fragility. This > > >>> should not result in a user-visible change in behaviour. > > >> > > >> Hmph. If the only user of the bit does not care that this codepath does > > >> not honor the bit, perhaps a simpler alternative is to retire the bit > > >> that nobody else uses? Or am I reading the above analysis incorrectly? > > > > > > Before this patch, there is one user of this bit: use_pack(). This > > > function might open the pack to mmap() it, and close afterward, unless > > > do_not_close is set. > > > > Yes, use_pack() may pay attention to it. > > > > But my point was that use_pack() may pay attention to the bit, but the > > bit is set only by a caller that does not do use_pack() at all and > > managed the packfiles itself, if I read the description correctly. > > > > So isn't it an obvious and simpler alternative solution to remove the > > code from use_pack() to pay attention to this bit, remove the bit from > > the interface, and tell fast-import that the bit no longer exists? > > I was kind of torn here myself. The question is whether this safeguard > buys us anything, and how important it is that we indeed keep it. I'm > mostly worried about a future refactoring that starts to reuse more of > the machinery of "packfile.c" and that thus starts to honor the bit. > > I'm not sure how likely that is though. Overall, git-fast-import(1) is > quite a mess with regards to how it writes its data, and it's completely > incompatible with pluggable object databases because of that. We want to > fix that, but that's likely going to result in a large refactoring > anyway. > > So... yeah, I dunno. I guess it's probably fine to just remove this bit > altogether? I have spent some more time on this now, and the result is that we actually need this bit because we _do_ call `use_pack()` via `unpack_entry()`. So dropping it actually causes a bunch of test failures, which is good. I'll adapt the commit message accordingly. Patrick