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=1796200728; b=GIcA7CLdeCcOCGCSxcXN0gbqRvo/o1+PWTDx6w0s9MNSE1aTIZIWkVRG0PAS94TFCmx/ 7l2RNv6713/ANUEGX1cmB6ixgBM9cwj8ifbqtjxqZBm8wT14uiIzodjDNXaCw8qYOASHo Rw6QHMLFM6x5uefkxgpHFBUYS27RWwUwFY4CuwE66LgfcEnbLHSdVdh7UsSDU3YdWsGTm GusAa/dAJ4ia5Vu3b3Uo1BEDxq7dgmMgcPeoBnr2nnwJZ/1BC2PE7oBNbaCZU+3DcP9Wt 0aHdGmGF7a7ZrhmuMeVji1G5NmECz2SEb5/k13xzcqGDkUgM/MqEPiFotiTvqvfL04w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796200728; 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=grRftvK9Damp6LB16e4ZqzVycNeRUfdoQddj1lpGeDY=; b=R6bC/Qgj8mqR/+Ac3LFgHeGMonu1YEnTinrZxhc+ADAoRI9lfzcyAcEkC2h3ztDdO9Rv fy8IjzydLghpTYfWUkzhpP/v2mG7Cc9F56NLlu+g80+K+1IQZCJib4G1AgsV6J8kxEI7i ZACW4c4Fjm30JrpXPzVdtGmMggLS+rjtU/EAXFkQ/L/MDOjULxK2x6GqrSQ6Rco2GZnZH sD2mfLygkjFf42MHhNL6kQCSG8P6bf/esopTb3/FgtKeYcATqqkWGotJw24J3FI1gvSTX 42bKhdUUXbky5wSf7cXoqpIkSr5IVM0EnLOwKxfLLc8OEnHVKCTDW2rFpNFVSPJJIjw== 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=pUzlPJt4; dkim=pass header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=fDQHZaxm; 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 98DF9606A322 for ; Wed, 2 Dec 2026 08:38:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 98DF9606A322 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=pUzlPJt4; dkim=pass (2048-bit key, unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm3 header.b=fDQHZaxm Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id B968E14001BF for ; Wed, 2 Dec 2026 03:38:46 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Wed, 02 Dec 2026 03:38:46 -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=1796200726; x=1796287126; bh=grRftvK9Da mp6LB16e4ZqzVycNeRUfdoQddj1lpGeDY=; b=pUzlPJt4Kp1hq62W+4OAmx/Qzh XnUiKZku9OlmrYd485gg32VBv0LfMHkc1eo5J0qBVvYHcOI8fM63cqeciwRtILeq 4QfcZ4JJubV+N0sGUiUBdScJ0PoJwy8DBAZ6/5+KLhu0mep+FTXHWRKmqK9L5J/s HCC2f2YBwiBw1tJ1eYDwIYPaD0g6g5X+AU3jkBQbWRaPZ6GikkG2YnCmxQTXz23L O1bsehqGHaCvxiPrFo94kpx3O5F8INkRWuvFD1DAq7LPeQAN0jsFupaMT8Dd2Rdl 9lN+PQPNWwG1cvUyuTx8/2qGyyUCkLyrV3GflCpLReTLoqRjRKWu/TFwcfXg== 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= 1796200726; x=1796287126; bh=grRftvK9Damp6LB16e4ZqzVycNeRUfdoQdd j1lpGeDY=; b=fDQHZaxmbENn9J4+N/RGYiSCIdCSnotZRsQpH4ShLx7FE0t7Y82 FACM0j4aPV1vTaiOWJJDGZoIpYhnLGwQ380fWFmxKTrqRr7UTSUupf+Z/SQh/UW+ QgAs1uwPwiAwOJT41t80TBC1vIBJzcxsM5aAx1CUPTMBU1PsLnIYaODWLciYE5Y4 MDG0oO0iQUKxuZg4bQtctHtXW81wNUIJzRrnnr4gZnfphOkf01AhXbAE3eiuPysv nYNjrq5P1MU9IBKH6X09rQ9gmwozXyMQYkHw4z2II4q/2yZmHhJyAsr4VotLt/sA H9mPtyyqR+WOn2MqEN/hc5zbXZ4KIhJOAeA== 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=1796200726; d=pks.im; mf=PHBzQHBrcy5pbT4=; rt=PGdpdEB2Z2VyLmtlcm5lbC5vcmc+; s=fm3:rsa-sha256:PNU1NRC7rqa9Sww07USkQTdNKMA4HBak1m/r1V9WVBCLFCT KP0IcY7cos+w5zwcXiMnYlY2S8didsxhDFaw1RGBPtCFFaZl1D2n4ojC1V9fVqji rbbjWvRklvrJJsVxRlCKKQtivOv2EH0Y1gi5fZapGZToZ5cYcTVW2jgtJqGYBBd3 ZhQLZbGm5jxYXQROi6eUGN9/Ws1JnU47r+NUGwrzOLK9rKx5LhwARz8dwAk42YNc YLCieemo5afCN+BEKh7XhrG/ASK7V3kJrXeaya4Jfy+/3IfmkIdMFDBjBW9RU+OD COU0gDzKZY+i7M5VBf1p7e79TRVY3LDOsTBw5Vw==; 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:zvGoYuXX52HZrddYKDlqmIxFXjIFe3vfNYvO1HqrTes=:hOT0halTAYm1riESbeHDAX9pb7Org1hJwyHJ6BOzuKM=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTEeSi7GS6P3DT0HdqggXm7Gnqc64Iqb2AHmjmvhOANtUPmf2ZDDXULtAGpFko4a3t 2l7FWgwW68N0AT47m5TIVSkyty33zxqieGq8fGAtJHMisdMnHeHNPSDc9ojkeKfGasAoy/ bVxrPDQcIG3Qo7+rbaLg+DX3xz/8LwE49X1lTuqb48HNIwAPHcbVAFxBeetXZVwhaEYsjs Z90FXnj/Vn1hjIOuKetblvN7bGsIjG4ycCj+KYcwGURiM75Wr0V+7y8q4ciUIpHTxZjsPc AGBqJcH3xgz8s+iulsaQZSTZWEqUDdNbw3HpwDGCsaoBHeIw9mwg50L35/7iOStQDxFFXo m3f34Qpq/fgbVo7kOzAR2vyiMzQ8A/kUtOkFX/0jNjPLr2gAK7y3SwEL74QkrInz+/TLJS aA5rVVgUGuHtteMz/TOUy/PxXLTW3IWPaTfB7pyLqMiSHSO8Q6HgtrQV56Cq0W3GAIsNJZ PjAwSOjnPJuF0Jep+KMeD3IQhAqbvfzSapd4/Oa/YDg6NmYceWJV4iBa10ZEm8lSIEAt1D J5V5bL/MWXZ/Nqcqz2RI2HW+di7DwuQ4Zvs/FZ6JGpKG42A8Zc9PcyCMBhmMEeInfplvRz 9sFgLwSgaTTjRGp69ACMLs51xldv6RhFf0MB9TVPVEfXgNxaPXYrJDetlJQQ X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 2 Dec 2026 03:38:45 -0500 (EST) Received: by mail (OpenSMTPD) with ESMTPSA id ffa160c7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 2 Dec 2026 08:38:45 +0000 (UTC) Date: Wed, 2 Dec 2026 09:38:42 +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 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? Patrick