Article View: linux.kernel.git
Article #1335Re: [PATCH 0/2] status: stop holding index.lock while collecting
From: Jun Wu
Date: Fri, 23 Oct 2026 19:50
Date: Fri, 23 Oct 2026 19:50
36 lines
12183 bytes
12183 bytes
Hi Junio, On Fri, 23 Oct 2026 11:33:12 -0700, Junio C Hamano wrote: > Mihai Cosma <mcosma@gmail.com> writes: > > > This overlaps with Jun Wu's "Wait for the index lock instead of > > failing" series, and the two fit together: his makes writers wait for > > the lock, this makes status hold it rarely and briefly. They only > > conflict on the one lock call in cmd_status(), which his series renames > > to repo_try_hold_locked_index(). I'm happy to rebase onto it. On top of > > his v2, the slowest "git add" in the clean case below went from 1020 ms > > (one failure at his 1s timeout) to 160 ms. > > Perhaps you two can work together and send a single consolidated series? I think the two series are relatively independent: - Mine changed non-status commands. - Mihai's mainly changed "status". Neither series replaces any part of the other. There are multiple subtle pre-existing race conditions involved: - I fixed some read/lock wrong order races. - Mihai fixed a update_index_if_able() race when skipHash=true. (This alone could go to maint.) My preference is to keep them separate to bound the mental complexity needed to understand related issues. The actual textual conflict is just one function name. -Jun
Technical Details
Message-ID:
<20261023195101.1087983-1-quark.zju@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73091-linux-kernel-git=dewy.ruReferences:
<20261022184420.3648771-1-mcosma@gmail.com> <xmqqik2s5kt3.fsf@gitster.g>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73091-linux-kernel-git=dewy.ru
From: quark.zju@gmail.com (Jun Wu)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH 0/2] status: stop holding index.lock while collecting
Date: Fri, 23 Oct 2026 12:50:55 -0700
Organization: Usenet Network
Message-ID: <20261023195101.1087983-1-quark.zju@gmail.com>
References: <20261022184420.3648771-1-mcosma@gmail.com> <xmqqik2s5kt3.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="596284"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7oi60exUczImurKVBIijadt+eK8= sha256:jy5jVd9+LaUUxrGbDToK/wWVe0oQAiggLG36ZiAf+jA=
sha1:fdaPgpAjFWVg7cP90OmB5yODRQk= sha256:ePGyxvRjANGbAkY3+B/V2xs9AJt71V1fiFjCaTf5+M0=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 8CE21111569; Fri, 23 Oct 2026 22:51:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id XnSWwESl7eS5;
Fri, 23 Oct 2026 22:51:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73091-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id CCD21111516; Fri, 23 Oct 2026 22:51:13 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id D695D3745F; Fri, 23 Oct 2026 19:51:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792785069;
b=1dvlwuau9SpsKTOPRJM213R9fiU1dVY5IIXic1FsXH9W1RuH1tDLdLrSoNC6vr41GN7z
GzhxMNL0oILoG9WeUlnrqitpBLQNEqFC6p0JVi8bWNwhvRdqLKTuaEoLjOCsKR4aqcNSi
EbUhxH+rUZL7HfL7wzJt2WtvsX2BZUUPczafg9MQ4Cxdnlf3F9OH3Xx72SlOTJweI0aim
IYmjJ6palXxat2uo8LBov56AvI8jqZSOGwqI8dMVtesN4Z2Ni6i5BY3zQO6UKYOAfzQI1
cIAJalntyQOIj/DQ9NgD+cLYE+SOPUyzo1UiYB3kU8RRVDJuxX5YrUZRAnpch/aHokQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792785069;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:Date:Message-ID:
X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Type:Content-Transfer-Encoding;
bh=1gZqlbkkE8eNIWCKmllkVgxHrGCvooNy7KYVdJo7UQc=;
b=Fvs+1CiuayYEEGokn4ybJ2fxLwooEyq+MWGjgyxYzG0rc6cn+rLuKbtHaCdEzxh4bSDC
bLZwetIvDtIjxGADuxrT+NkZwXRK+IGcxvF34FFwQX75ju+UAnr8c/mfH8ntookMUkbuH
lDRt5l08s6NuSqBZuKeqkE45f9A5K4IK4Y5oJ1aspH31Pa21gB4XsUNbfcYyrGgcmh2x7
DL92yRbagwxNmXSHrLJk6fzm1g9NzeofF5cCF+aFS9b8bw+/yEvgWNibjWkZC3SGN+wOD
E3vjd3ySWFZZIMmGNq9glsIxq6LQrWPTbp+gPA50qReDk3G7M8lcAG0GKn8ctf15SkA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=PtOlAUKT;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A7A5E606A321;
Fri, 23 Oct 2026 19:51:09 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=PtOlAUKT
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.49
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792785068;
b=sTCgumIop2f7TlkyIphBka6ho3TWnWdGgDdPj+XJgzUo7k2sBDgXNYmsQFYG3mM9EHuI
tXha0pIpUIiut0kNdg+lwBaCA26W8VLC4bbcvok9I0ckz4UexaHUE8VyO4yGplQKXkw9Y
ecVPm5EnaiOU9tXj7KaO3S97jpW6YjL4PNCCmqKIztNb+RwKf7P8c+XtEOzly8eDWYuNs
liTcYK7aJK2JGARz7cBOMQ17IyiD/d0IckbuC3BhNcK85YQYVRk6tzd8w1JVUIQQ8jF/A
Uwp599r7VBPpWSyPda3t1fZ5Vup0uTE1vj+VSZApqj7eP8POVEFV9+IcsveyhXfstAA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792785068;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
MIME-Version:Content-Type:Content-Transfer-Encoding;
bh=1gZqlbkkE8eNIWCKmllkVgxHrGCvooNy7KYVdJo7UQc=;
b=Q2tDb9LbqHFNAWP0++JBASOsDjGK7/NjDHfYLopHJSotyppolMfQtGmThd5PThrROX1W
fjIVZ7PyIWAkhRHdLpswUdb+ckZlEpg+R7mIQzTVgxT9h/Wjv/H5hFkZbEHMnE3KwVYz1
jbbA6coK3WU+gdkdFvCYRQ1mxTDs6r4PfNeLJBYHzqs32+n2qTtNUVc05xIO8CfTkziDM
I6G35M0Q74zdkTk4Aj39D5mVTmqQNekq07peQnTs1LE8/t+qHdAMfez7SkXP9ejx8clZw
sfenMY3Vbexcw6aR3eT+2yWkwcp7gpvFVsQlk/OlYwWwm+CAPhb53QoUx8HhJO4khuQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=PtOlAUKT;
arc=none smtp.remote-ip=209.85.210.49
X-Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7265D606A31A
for <git@vger.kernel.org>; Fri, 23 Oct 2026 19:51:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 7265D606A31A
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ot1-f49.google.com with SMTP id 46e09a7af769-84621d8c7aaso565043a34.2
for <git@vger.kernel.org>; Fri, 23 Oct 2026 12:51:08 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792785067; x=1793389867; darn=vger.kernel.org;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject
:date:message-id:reply-to:content-type;
bh=1gZqlbkkE8eNIWCKmllkVgxHrGCvooNy7KYVdJo7UQc=;
b=PtOlAUKTw9uj+xBdE3pdTcxHGRJVeIgDQ9ZGmFqQpi0JQriX+K393+gSwidyKnxGaA
t1KlGV3fMzN3n3udtw93Wq7rUfvGinKFt5pCa08R7F1RZtqXlRbm/u/x22ZOrW8vr+fX
4LHvbxjTKW9cKeOCVUN/51dW4lbKeZUT/H2K72uRh68XdtmrY2z1g25CaOzRNg5xkOQE
Bc07kz1bq7G/w7QZ+cDVAovJtD9dZuMX36CqaNT6ircRftS9uy35I0H8JlUXN0ZsFNZP
TzTa0xtQd0rvsZPGM55db6Yh8LjM/6aHSJqIaiURKJDktBuvR9KgDcODotpWMidXqXFJ
zHpA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792785067; x=1793389867;
h=content-transfer-encoding:content-type:mime-version:references
:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=1gZqlbkkE8eNIWCKmllkVgxHr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oXY6r45en1xdBBAavO6YV4eUkqMmHrT6zKaJqXvgRU0wnq+CfFzXEb/A6vKcwfg
ZNeTG+ziQbflGaTdF3DohrOcrDrjKoPmuZrbdO3TtQLzYVAy4QUoKBl2E0/zXbwqqMPCxfrGE3H
yF0CWFASx/7kGF/n6BmOzJaUcQLIcKmyM0XxHC5xMK6EQFs=
X-Received: by 2002:a05:6808:1b0d:b0:54e:31cd:dcd2 with SMTP id 5614622812f47-55c00353913mr161192b6e.44.1792785067172;
Fri, 23 Oct 2026 12:51:07 -0700 (PDT)
X-Received: from quark-fedora-PF5F60VQ (162-199-88-188.lightspeed.sntcca.sbcglobal.net. [162.199.88.188])
by smtp.gmail.com with ESMTPSA id 006d021491bc7-70b9dd3c9b5sm198752eaf.2.2026.10.23.12.51.05
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 23 Oct 2026 12:51:06 -0700 (PDT)
X-Cc: Mihai Cosma <mcosma@gmail.com>,
git@vger.kernel.org,
peff@peff.net,
stolee@gmail.com
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <xmqqik2s5kt3.fsf@gitster.g>
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list