From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F394C77B7C for ; Thu, 11 May 2023 05:56:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8DC7D6B0074; Thu, 11 May 2023 01:56:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 88DEC6B0075; Thu, 11 May 2023 01:56:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77CF16B0078; Thu, 11 May 2023 01:56:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 698596B0074 for ; Thu, 11 May 2023 01:56:51 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 356E11419D9 for ; Thu, 11 May 2023 05:56:51 +0000 (UTC) X-FDA: 80776915422.27.D7AC77F Received: from out-20.mta0.migadu.com (out-20.mta0.migadu.com [91.218.175.20]) by imf12.hostedemail.com (Postfix) with ESMTP id 9738E4000B for ; Thu, 11 May 2023 05:56:47 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=hmSs4gLA; spf=pass (imf12.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.20 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683784607; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0iOiMX6sv+DQehmZI33b0k3P+A/HtVxXVvqqZmBD72U=; b=GKiy0X5J0SfcGcAdKDX29zKl7o0kVYpIED94yS0bPVashC3w3z69tVo+ZSIsUxylKXbE/p Z2kMAYq8sqGRGVGdsOfAgguV0Q7WcK2mqFU7Nj4kzHYzHEKz/UK/oBemGTe14t57znmceS yS/3CdQexrJSWu73l/+wpnd+7TkuwCQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683784607; a=rsa-sha256; cv=none; b=za1YKeY8s0mSaQVmm8oIbULbddXEjL27eskV1q6rQbcZfyDvmKnau/joQcqIeKqGTYvtB1 EsVwbB9PmjvGhuCzpbP2CPSwV2+9RNhKkREZ/MpK7rwgNnHJG0fYEb/KcN9VhgH6A1NI3+ lF2VR497VwGL4skMwsl3ZVNgKFHzqZ4= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=hmSs4gLA; spf=pass (imf12.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.20 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Thu, 11 May 2023 01:44:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683783860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=0iOiMX6sv+DQehmZI33b0k3P+A/HtVxXVvqqZmBD72U=; b=hmSs4gLAmdr54kJa3buCPbG6CRX+mFcsgPHVdenXCmFW9gT1U5PdBV86nHo8lf/4IJnIrh WHSvFxFv4OLHOHo80TvgsemT19uXyTS5gEpd3uozGpUwxCGRaoAjaiC5wTrDlhVlvgXIkf hGRuujciGhX4BV9JZLntpLgf5lziWFQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Theodore Ts'o Cc: "Darrick J. Wong" , Lorenzo Stoakes , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-bcachefs@vger.kernel.org, Kent Overstreet , Andrew Morton , Uladzislau Rezki , linux-mm@kvack.org Subject: Re: [PATCH 07/32] mm: Bring back vmalloc_exec Message-ID: References: <20230509165657.1735798-1-kent.overstreet@linux.dev> <20230509165657.1735798-8-kent.overstreet@linux.dev> <20230509214319.GA858791@frogsfrogsfrogs> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Rspamd-Queue-Id: 9738E4000B X-Stat-Signature: ca6sw7y9sz9gtjgjy9wqnmq5gxgr3b6c X-Rspam-User: X-Rspamd-Server: rspam09 X-HE-Tag: 1683784607-369886 X-HE-Meta: U2FsdGVkX1/dK44YWX5Zzxq8zcxivXsA/3XomWuIVfQoaSuZLG2qIwvUNTk5GeZbO7A7MqY+2DyC8gMxT8Gaeu9z/43LmfQJ+iKHeVauRts6hWDZxymetEDTw7mNxM3nYVsmQ43CcmxZLfeeARr+swcrfCEHKUTiAK3yHg2F5M4TM3CW9L5Pgf/+47XVlZ6EWfh+r58aUij7HckpCFVxesiA1wN4RyQkhhOFxwKa6Q3dPuDW4FWU/pLJJOqrquBkU/j9ihClYzLCMxhpwiLvHt/PSaAumv9t7augWA7ZML4Kgd1ZCJmXqrcirulUoIMh3jkX+xcjTYYpLLAaBxGVEd1TEjCAEJlubv97R938EoZJh4d7mWluGk8kXhzCbKOs4LAjSvW6r3b8ylUMLZtk3ScTffUZdwZqE+ZFB6eCCZXMwekvYzWrdXQw72ocsGeYJPUIyMEy3c8IxBe19Dis/KIdUFF1lxI7RV1a6PtTfJwQa4Ffe9gjvi9BD8zfJcP8e0LnCb4k0Ydv2VDURvzUfmmyNuIj28+l58soYe5xXYPh5I0lPMzWc5Hiar//APi26TcdZ476SHq1RV9+kyQ/zBs5xNiNzwX6+iSU58sYn2bdQ5upvPGv1y3a+wegYxfFJJDT11AMPs017JlEe64zHSCpEJaLTen+aevEqSN0liBroaanPjvmVgeM370x4Ez3worpmeGDV9PPOSQF/rYTCAVSI1c/scoceY0Mh1nLKyX03aWa75wv12KkWdyN7XyVPIs2CnHHajj1/8Vq6xjRc7d1E+87HraUK9bm6VuXvE5ezUn0con44k6ZOUEIsi+nGGFsWM0JABI5+DYVkjGkXKjyv1y6LHi9mzN1vJhUJ8YoIzljThUkqMilun+N63ASs+qya3do/1X97LUY7SS1eAt1wHY9Vv1ZBj3KcNTNwVVlgekJ92bLk5ZNhoRPxNaC5qIxCTKOz0SL72Dgibi tJU2TTuz AZL4epoCMgmjtCbHDgT/XDw2CoeV6iGoxajLu9Tsk0l9XyHEE8LfdOnqbAA5oehYMbJ2qXdWSDq2qkEwQ3BQXoxk5X2B0c8X2MnVuOLeIZVdWzYuldenU/t/6qtHG0Axwe1a+cTfMxa3PiJafMsMqXW8lYq5VjQ9ObzlEmHT6S1mIObU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000003, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, May 11, 2023 at 01:33:12AM -0400, Theodore Ts'o wrote: > Seriously, does this mean that bcachefs won't work on Arm systems > (arm32 or arm64)? Or Risc V systems? Or S/390's? Or Power > architectuers? Or Itanium or PA-RISC systems? (OK, I really don't > care all that much about those last two. :-) No :) My CI servers are arm64 servers. There's a bch2_bkey_unpack_key() written in C, that works on any architecture. But specializing for a particular format is a not-insignificant performance improvement, so writing an arm64 version has been on my todo list. > When people ask me why file systems are so hard to make enterprise > ready, I tell them to recall the general advice given to people to > write secure, robust systems: (a) avoid premature optimization, (b) > avoid fine-grained, multi-threaded programming, as much as possible, > because locking bugs are a b*tch, and (c) avoid unnecessary global > state as much as possible. > > File systems tend to violate all of these precepts: (a) people chase > benchmark optimizations to the exclusion of all else, because people > have an unhealthy obsession with Phornix benchmark articles, (b) file > systems tend to be inherently multi-threaded, with lots of locks, and > (c) file systems are all about managing global state in the form of > files, directories, etc. > > However, hiding a miniature architecture-specific compiler inside a > file system seems to be a rather blatent example of "premature > optimization". Ted, this project is _15_ years old. I'm getting ready to write a full explanation of what this is for and why it's important, I've just been busy with the conference - and I want to write something good, that provides all the context. I've also been mulling over fallback options, but I don't see any good ones. The unspecialized, C version of unpack has branches (the absolute minimum, I took my time when I was writing that code too); the specialized versions are branchless and _much_ smaller, and the only way to do that specialization is with some form of dynamic codegen. But I do owe you all a detailed walkthrough of what this is all about, so you'll get it in the next day or so. Cheers, Kent