From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 10201 invoked from network); 8 Apr 2023 15:10:50 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 8 Apr 2023 15:10:50 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob0.topicbox.com (Postfix) with ESMTP id 33A11326BF for ; Sat, 8 Apr 2023 11:10:49 -0400 (EDT) (envelope-from bounce.mM28a486accd8e735904418630.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 2DA53180BA2F; Sat, 8 Apr 2023 11:10:49 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lM8c29zh header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=crossd@gmail.com smtp.helo=mail-lj1-f177.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1680966649; bh=iF27HdiC4fggJYzo 2AuTTaoxdQSct70PRDDczqiW5Vw=; b=RLcyiSzia1o/B4pCsAN5rOctP/XmwUwf nbE6WdWF50TKoi1m8nDkeOxM8PQqrSmssMd6blPpBcScZo3u1z0lJI+rY8/2o4w2 xUXB42dfzqVDhIlTzlLkMTziyDAKJFS4Evgic6RiKS/+x3H1k2XzXDpqUPWsal2l c/fJk0a5TOk= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1680966649; b=QvyaLlt3qTRJdjw9FQRj5cgmyI1HquSOTone7oqxiRsijFsduF Led/OG4FwmGivoDPXznynD0muQ+/A3HpXvASy658+wKew9qiJmbndboRRym9h2ya H7KPX4LABcODjEtTIRHyxE0APR2FZbWoh8ylTQRitlF7QBWE/3BU9G32A= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lM8c29zh header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=crossd@gmail.com smtp.helo=mail-lj1-f177.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lM8c29zh header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.177 (mail-lj1-f177.google.com); spf=pass smtp.mailfrom=crossd@gmail.com smtp.helo=mail-lj1-f177.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=H3q9+UwK; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f177.google.com policy.ptr=mail-lj1-f177.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1680966648; x=1681053048; bh=TU/7oWCKlsKpTfPOLTprM/npTeoR7DaU EmC12PPLX24=; b=WtdXldotcfEL8yYKXuhGirW/cwdBiGHc7G6SK3dBLbqzUYmz 3BzV13X+ZJIU1Q7OaXETz4T4uw0WUW4m4PdsH7P0CmrXJj0isXJZsPEbz+m8jaje 1mdYwC+1ItInWQQXNUwTCZB9hCcsHYaN53GVGeF0u9OB4ZCr467UGrWDaFk= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 43CF914E542D for <9fans@9fans.net>; Sat, 8 Apr 2023 11:10:35 -0400 (EDT) (envelope-from crossd@gmail.com) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 4B311B4E861; Sat, 8 Apr 2023 11:10:35 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1680966635; b=Xgf+kvnS5P8RMsW0VaAR/cjwmxAWpizD1cG9Los7EJegMqxA0s gmH11/ZuVeX8GeTL9ezANMprgDhKBq6eXwxLgXeaBS425iaBgRLv/Vxfc/Rjtrfp zkucKZb6lHwxZFI2O9tUQz9i0vj2laIQlEKU9S2OCgsQB7QjZjsB1csY2JNowQOY hzrfkWbUGq+0zWnPwaFwAlXq2ixHAVlfrG5x/ZymZxqDlprxhtRi/nCzxHftOGZj UaKmo7A9fgsBsxQQiLh7UTePfjwsGyZDjaMd6d5Q+cCN6bJ4GMOoTcCpipNR04N/ 6SsZ5dYzjmLmtUQQkr6lprSZTM1RjtQGQUGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:content-transfer-encoding; s=arcseal; t=1680966635; bh=w6H9iABAyQNYNj9Ce6kloi8XE49JWndr9/f iW0JeJis=; b=fuQoiWnG6pVOZjK+KhG5Q0W4nHRpRrbzmvzExUNL7S9CKrLNDn9 w4q9CEXeUC8dD9Dpq4Svd1OOPiKSeaLbM8GKZ1GZdfbN2iYTMd6vVuJbw2vR1Skb +dZrzDdwVLCcVDGcHJvJbgV7Ej81UE/8IeyHnvnzjGC5CQno72AYzdVWqXVyJufu Nsm/rUcKiVrt37B34V7xbEuOcYSYZs3rKyEJGHlpV9SlztOU0k1HgLvmVMyDoC/O j5Zy58my//66qtow1nuG8orSgz5E7OTxnav0blDilkbzetDjf+bASta/mIm6pCxN +4w+2Us8Yqas5HNNvnzFVzfVJC/dAvMJj2A== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=lM8c29zh header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.208.177 (mail-lj1-f177.google.com); spf=pass smtp.mailfrom=crossd@gmail.com smtp.helo=mail-lj1-f177.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=H3q9+UwK; x-me-sender=none; x-ptr=pass smtp.helo=mail-lj1-f177.google.com policy.ptr=mail-lj1-f177.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt2.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejjedgkeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeggfhgjhf ffkffuvfgtgfesthhqredttddtjeenucfhrhhomhepffgrnhcuvehrohhsshcuoegtrhho shhsugesghhmrghilhdrtghomheqnecuggftrfgrthhtvghrnhepkeeugfffvdettdevgf eiudetkeduheetffdukefhfeekveeftefhheeuudektdegnecukfhppedvtdelrdekhedr vddtkedrudejjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpe dvtdelrdekhedrvddtkedrudejjedphhgvlhhopehmrghilhdqlhhjuddqfhdujeejrdhg ohhoghhlvgdrtghomhdpmhgrihhlfhhrohhmpeeotghrohhsshgusehgmhgrihhlrdgtoh hmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'crossd@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="crossd@gmail.com"; helo=mail-lj1-f177.google.com; client-ip=209.85.208.177 Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 8 Apr 2023 11:10:34 -0400 (EDT) (envelope-from crossd@gmail.com) Received: by mail-lj1-f177.google.com with SMTP id e20so1220546lji.6 for <9fans@9fans.net>; Sat, 08 Apr 2023 08:10:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680966633; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w6H9iABAyQNYNj9Ce6kloi8XE49JWndr9/fiW0JeJis=; b=H3q9+UwKYrQEJAmZG1UcYHcIKx+WX/W8u3JWHKYdN95SEpj7L84cKtYgZny3gtlkVV E30mYk6z7dN5qxqh1LdT9cEvGml5xP3CYfvPidtGSYv7OU290oVeJf7unN0ANY4jXDRC 2GmxfBdIhonql29nrzck9NMkpBcRKLR0kCD4/9VtfRjevWjvbKtOW+3NehTnDsXeahUK b69OtNfzrk90ypLBvuSZQTnzxNS3EbkZuuO/vhk4DNvzKnOukTN9NczaeI5Uo3kzU+Zl Gr3UtGaUS+XVhbJoXysgInSDcmEXuAV/TJwjtT1UKM8zs3XfCz9AiNeQ1O0fTRxj37/v 9jrA== X-Gm-Message-State: AAQBX9fB8DxYKD4qcdQxxdVRPIacSOlcJ3Y9NvBFWVNNJzgs+WbK/Kne DZVdaD59b2OEJf37mIeu7kzkiIJ9Q46kdwMbAXbcNI3z X-Google-Smtp-Source: AKy350YjZB0mBhhgBbYrYFhgj0jtt9RH0bq/tSLgo8wllty5eP0h6XvZUGSRVF8oSLHYWwcLV4FZ15i3bJLzWHpXpLw= X-Received: by 2002:a2e:9a96:0:b0:2a0:f395:cc44 with SMTP id p22-20020a2e9a96000000b002a0f395cc44mr582711lji.8.1680966632519; Sat, 08 Apr 2023 08:10:32 -0700 (PDT) MIME-Version: 1.0 References: <5FDFDD1BE417BB199083F391366A6EB3@pixelhero.dev> In-Reply-To: From: Dan Cross Date: Sat, 8 Apr 2023 11:09:56 -0400 Message-ID: Subject: Re: [9fans] [PATCH] fossil: fix a deadlock in the caching logic To: 9fans <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 86ebf530-d61f-11ed-88ec-cc4b412a99ec Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMzU0ZmU3MDJlMWU5ZDVlOS1NMjhhNDg2YWNjZDhlNzM1OTA0NDE4?= =?UTF-8?B?NjMwPg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M28a486accd8e735904418630:1:r3rgLAN1CIS5I9pjJNGh9M80NgoL0ksJN-LTK44h_Rg On Sat, Apr 8, 2023 at 10:37=E2=80=AFAM Charles Forsyth wrote: > It was the different characteristics of hard drives, even decent SATA, co= mpared to SSD and nvme that I had in mind. Since details have been requested about this. I wouldn't presume to speak from Charles, but some of those differences _may_ include: 1. Optimizing for the rotational latency of spinning media, and its effects= vis: a. the layout of storage structures on the disk, b. placement of _data_ on the device. 2. Effects with respect to things that aren't considerations for rotating d= isks a. Wear-leveling may be the canonical example here 3. Effects at the controller level. a. Caching, and the effect that has on how operations are ordered to ensure consistency b. Queuing for related objects written asynchronously and assumptions about latency In short, when you change storage technologies, assumptions that were made with, say, a filesystem was initially written may be invalidated. Consider the BSD FFS for example: UFS was written in an era of VAXen and slow, 3600 RPM spinning disks like RA81s attached to relatively unintelligent controllers; it made a number of fundamental design decisions based on that, trying to optimize placement of data and metadata near each other (to minimize head travel--this is the whole cylinder group thing), implementation that explicitly accounted for platter rotation with respect to scheduling operations for the underlying storage device, putting multiple copies of the superblock in multiple locations in the disk to maximize the chances of recovery in the event of the (all-too-common) head crashes of the era, etc. They also did very careful ordering of operations for soft-updates in UFS2 to ensure filesystem consistency when updating metadata in the face of a system crash (or power failure, or whatever). It turns out that many of those optimizations become pessimizations (or at least irrelevant) when you're all of a sudden writing to a solid-state device, nevermind battery-backed DRAM on a much more advanced controller. - Dan C. ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T354fe702e1e9d5e9-M28a48= 6accd8e735904418630 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription