Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp8332800rwr; Wed, 10 May 2023 23:00:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53e4k8cLfl77EOFb4whEAsyfrmCBo2i4IklBkO7EPxC30mFumOClLQyKV2TIC8mx+epq7W X-Received: by 2002:a17:902:d2c4:b0:1ac:5717:fd2 with SMTP id n4-20020a170902d2c400b001ac57170fd2mr17797666plc.47.1683784824359; Wed, 10 May 2023 23:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683784824; cv=none; d=google.com; s=arc-20160816; b=g4nPBdsC8U4vnOe8YRq029SzIX2ThP5LBnGUZAigLvvgDxfu7EhPT9wIqzg3rt0uXO pDfIFclC0xoi1OinVhy1LxvkdtuRusLJTIzayg2VfMTqyQq4EeZiMbFqiFg0fgWpzVq4 YtWKlHhJh9oVHTIM056PgdqjfKJL+5wQ9zm6uF7VBTIIye7fnwSLGHQrvX2QvWpujE6n 5tsWjcA31O3HdXjktyK2RVXVo5XzGB6weDDdtuZhseeWphQtNnBYq9Oo1aF8UINoiBZZ QfNZLxmbCvypx0p62wrZJmrrzK3oOAgvIBg2MDpDscJr2kvdTtCgcX0lE40L88a/Qa0Q draA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=0iOiMX6sv+DQehmZI33b0k3P+A/HtVxXVvqqZmBD72U=; b=kuV/eX+JrZNxdm/8ZilGNdIgR5mUhSRP2wiviqMq8lBoAj15McdcNkq2jyPg2iL4bM thhg/cXlPLMGhLt2YUSicwqsNL4p2qvgCafDJoHSopxSUyZcfFLrfGuUbcngnqgiSMLP LroOudbcETZN9FGioR+1JlXAQRX2LKmMGkiL3Rqjq93ESZ6K4QrUiHjmlqYdCxu2H/gG lNmMNrnUn9Ft44V5gHN0KzCNxJTOLLyWhvJmXACAGlSQQYbKsiiucu+aD6UvKX0UgrHr chngz4YA/FLV18pjroELgC+en+DZjQx7Ugbi43sL7cs57EP2xaR2tKuoDUT8o14lBgMJ nWCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=hmSs4gLA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a170902834c00b001a98769369fsi5326303pln.266.2023.05.10.23.00.05; Wed, 10 May 2023 23:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=hmSs4gLA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237142AbjEKFov (ORCPT + 99 others); Thu, 11 May 2023 01:44:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237108AbjEKFo0 (ORCPT ); Thu, 11 May 2023 01:44:26 -0400 Received: from out-38.mta0.migadu.com (out-38.mta0.migadu.com [91.218.175.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EB675252 for ; Wed, 10 May 2023 22:44:22 -0700 (PDT) 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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