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_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26045 invoked from network); 8 Apr 2023 17:14:00 -0000 Received: from tb-ob21.topicbox.com (173.228.157.67) by inbox.vuxu.org with ESMTPUTF8; 8 Apr 2023 17:14:00 -0000 Received: from tb-mx1.topicbox.com (tb-mx1.nyi.icgroup.com [10.90.30.61]) by tb-ob21.topicbox.com (Postfix) with ESMTP id B6D5C310BC for ; Sat, 8 Apr 2023 13:13:58 -0400 (EDT) (envelope-from bounce.mMc6cf9913394dadc41af96812.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx1.topicbox.com (Postfix, from userid 1132) id 6F6EF180EDF5; Sat, 8 Apr 2023 13:13:58 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=sdaoden.eu; spf=pass smtp.mailfrom=steffen@sdaoden.eu smtp.helo=sdaoden.eu; 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=date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1680974038; bh=5ocX/urpBgBPLRtC cE/t1dFAqJGOBPx2jLNz6mKw++U=; b=N4XDh076e+rFqWx155cGqr6kybJqiIQ8 VDk/bhVhMFGvko3SJfGt+Ds4C1IwMjtulVuy80RUZ/lH1FrVqig2k2wBvnElvrqE vfs1wlmNIECOJEvG2ilZw0fwcfDvPNzIsrkvuurs7mriVSOn2iNbfj9f/XLroMPP HGlGjXQ8LBk= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1680974038; b=VNKaUV6CNNVEeI7mLMKVSF88M9fLqSS2SYW+AgthMe8rYoyzJ5 VaH5oXbfrr1qRDS62ruepKx+z3NgIyua+9JJuITHj5ChdNohmoi3xV7L6n8xWnz7 LCBSSJcjCOPoHTbK1Q2ZO0Lt4AAhgaOcfhT9DU83zgBmeNglc9BkDbNXk= Authentication-Results: topicbox.com; arc=pass; dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=sdaoden.eu; spf=pass smtp.mailfrom=steffen@sdaoden.eu smtp.helo=sdaoden.eu; 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-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=sdaoden.eu; iprev=pass smtp.remote-ip=217.144.132.164 (sdaoden.eu); spf=pass smtp.mailfrom=steffen@sdaoden.eu smtp.helo=sdaoden.eu; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=sdaoden.eu policy.ptr=sdaoden.eu; x-return-mx=pass header.domain=sdaoden.eu policy.is_org=yes (MX Records found: sdaoden.eu); x-return-mx=pass smtp.domain=sdaoden.eu policy.is_org=yes (MX Records found: sdaoden.eu); 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=date:from :to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; t=1680974038; x=1681060438; bh=PhSMoXjDgIWTe8GLxtxyLq9G6AAN2kwp x9W8509wu8I=; b=MyPacDsTPuNWhbEGn+NMgWiNfe/qFmP30xeP208Tm1+FXiyX NIAJJc19TBD8Rgb8kIq4xfeHDymOmH0NYSbyPZ5Pybg5/ST+kM4ZbYp0ukG5Wj4S Cq+TZjKV6RHukUektflbLlBSqgtXg14NPSkSH3cTWNMT3uhG6UVfCjt21kE= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 40A5E180E9A9 for <9fans@9fans.net>; Sat, 8 Apr 2023 13:13:47 -0400 (EDT) (envelope-from steffen@sdaoden.eu) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id D8461BD7964; Sat, 8 Apr 2023 13:13:47 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1680974027; b=loiC1Srs/iqB4cFQ0odiQ3xiEo1pmB+eYeGbPrthRpDBDU3pWc idLQVWcq3k+TdLpBiu/I5wtJCdkg04wlpYp+9p73Mm9F1LQdfMpeyBLidw5oNtLM Si3uWvtYTGhmMdB+wci5pIvkCzEBxg3vI+8eWS0jZsr3Tc1JduCtnZeNwVL+Qu/V bcipvrJwwAgqGzeLeN+aPIfveLkAMEPOqsAP9a/nNzdJpaXKl4oWb4j2onQCeAUQ 5dnyoiE0S84L9UOm6OG05zqrNAHhVIWfa/QLfcKf34mEyxxsegC5w5r9ZZtnRhYM vxBD5jXuL5BJEnc9aVXJrCkfk+qtHv2uX1vA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=arcseal; t=1680974027; bh=28fvAvjaT0qXhtAtkMWS/BkUzUzlcjaSvQB /dk66eo8=; b=LTiFPwunnIm9ZAzkIl6r7uuXBY2TFtLWfuiPL+KvJ6kWAEnYeAj bCoBy4FQzICIYc0pYK4SeFUtvX5kwukQE2nE1ZAiIiRTknwlOuGiDh906Ee8xJti srAc/CFGY+qWooAHcbzWsQBN2EWGGWkiNQthLjQYP9GgfWuMbEVE9Xkhydp1Qdqo cEtjwzEqFENifBMWt1J+w/HscNg3Nvyz34sIL+avD+Wd6DI2TQlwIWbYkiOjQ4uz KCOdLK6Jr6PYtrsnJJR8ahi0TrHHOL2fO86y4lCHkmblMMUW9gXnkI6u7BkMnB7t nJD0oms95WHSOBN3I7OaOcoZd0Htwdylzaw== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=none (no signatures found); dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=sdaoden.eu; iprev=pass smtp.remote-ip=217.144.132.164 (sdaoden.eu); spf=pass smtp.mailfrom=steffen@sdaoden.eu smtp.helo=sdaoden.eu; x-aligned-from=pass (Address match); x-me-sender=none; x-ptr=pass smtp.helo=sdaoden.eu policy.ptr=sdaoden.eu; x-return-mx=pass header.domain=sdaoden.eu policy.is_org=yes (MX Records found: sdaoden.eu); x-return-mx=pass smtp.domain=sdaoden.eu policy.is_org=yes (MX Records found: sdaoden.eu); 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: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejjedgudduudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf fukfgjfhgfgggtgfesthhqredttderjeenucfhrhhomhepufhtvghffhgvnhcupfhurhhp mhgvshhouceoshhtvghffhgvnhesshgurghouggvnhdrvghuqeenucggtffrrghtthgvrh hnpeevleekheeiteefhefhffdtteduleejveefgffgkeelhfefgfehiedtkeffudekgfen ucfkphepvddujedrudeggedrudefvddrudeigeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepihhnvghtpedvudejrddugeegrddufedvrdduieegpdhhvghlohepshgu rghouggvnhdrvghupdhmrghilhhfrhhomhepoehsthgvfhhfvghnsehsuggrohguvghnrd gvuheq X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sdaoden.eu: 217.144.132.164 is authorized to use 'steffen@sdaoden.eu' in 'mfrom' identity (mechanism 'a' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="steffen@sdaoden.eu"; helo=sdaoden.eu; client-ip=217.144.132.164 Received: from sdaoden.eu (sdaoden.eu [217.144.132.164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Sat, 8 Apr 2023 13:13:46 -0400 (EDT) (envelope-from steffen@sdaoden.eu) Date: Sat, 08 Apr 2023 17:27:57 +0200 Author: Steffen Nurpmeso From: Steffen Nurpmeso To: 9fans <9fans@9fans.net> Subject: Re: [9fans] [PATCH] fossil: fix a deadlock in the caching logic Message-ID: <20230408152757.IepXZ%steffen@sdaoden.eu> In-Reply-To: References: <5FDFDD1BE417BB199083F391366A6EB3@pixelhero.dev> Mail-Followup-To: 9fans <9fans@9fans.net> User-Agent: s-nail v14.9.24-441-g396e30a2ba OpenPGP: id=EE19E1C1F2F7054F8D3954D8308964B51883A0DD; url=https://ftp.sdaoden.eu/steffen.asc; preference=signencrypt BlahBlahBlah: Any stupid boy can crush a beetle. But all the professors in the world can make no bugs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: bbfb5ad4-d630-11ed-95ab-dba5b7d10415 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMzU0ZmU3MDJlMWU5ZDVlOS1NYzZjZjk5MTMzOTRkYWRjNDFhZjk2?= =?UTF-8?B?ODEyPg==?= 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:Mc6cf9913394dadc41af96812:1:eE53d8TyHGr34R4npNa1AWzofe2b7YbUQWotmwSAUHQ Dan Cross wrote in : |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, compared to SSD and nvme that I had in mind. ... |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. Funnily Kirk McKusick committed on March 29th fe5e6e2cc5d6f2e4121eccdb3a8ceba646aef2c9, saying Improvement in UFS/FFS directory placement when doing mkdir(2). The algorithm for laying out new directories was devised in the 1980s and markedly improved the performance of the filesystem. In those days large disks had at most 100 cylinder groups and often as few as 10-20. Modern multi-terrabyte disks have thousands of cylinder groups. The original algorithm does not handle these large sizes well. This change attempts to expand the scope of the original algorithm to work well with these much larger disks while still retaining the properties of the original algorithm for small disks. ... This change updates the ffs_dirpref() routine which is responsible for selecting the cylinder group into which a new directory should be placed. If we are near the root of the filesystem we aim to spread them out as much as possible. As we descend deeper from the root we cluster them closer together around their parent as we expect them to be more closely interactive. Higher-level directories like usr/src/sys and usr/src/bin should be separated while the directories in these areas are more likely to be accessed together so should be closer. And directories within commands or kernel subsystems should be closer still. We pick a range of cylinder groups around the cylinder group of the directory in which we are being created. The size of the range for our search is based on our depth from the root of our filesystem. We then probe that range based on how many directories are already present. The first new directory is at 1/2 (middle) of the range; the second is in the first 1/4 of the range, then at 3/4, 1/8, 3/8, I only took a shallow look as i have no glue, but is sprung into my eyes so i remembered it. --steffen |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt) ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T354fe702e1e9d5e9-Mc6cf9= 913394dadc41af96812 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription