Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1656273rwd; Mon, 15 May 2023 00:45:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6I2Kp7XP8WrqSvP83IY2epIMfW4QDehseZhlcHbuI0WFcjO8CC4KUj9rn86/yBmSIXU0fX X-Received: by 2002:a05:6a20:840a:b0:ee:d1b5:146f with SMTP id c10-20020a056a20840a00b000eed1b5146fmr42108731pzd.34.1684136753393; Mon, 15 May 2023 00:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684136753; cv=none; d=google.com; s=arc-20160816; b=eNLZPRhI9q3Fjn7tUWpFGaAKZUY6cbPioTC4U6hFq4XLePSwlBXkB35XpXOkRu39kl 8N92X/Phdr7Wp+GAIxBczXae6C6B0+nJG81/SEpxy6iljbefhpFNVGl/59LK1kIervZc At6MLUnkQf5nuCr0XSNEm9vYk7Qnvn6QtaGH00Nfhv1VfV2nSvmNE4/HiNL4uK90ezU4 NZ+Vfi9/dz7C0gUvbhatEIZvm6JW5fUE4N54f+dKhxfc4ixc0z+r7VEOosxnGsKdVSUR PioamXDzDM7yHMLZ8j3hg158k39FVjKNvmadpBT4ShxT1nmtYPS9hGsfVLSdqpYJorfW ucbQ== 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=MiMXjQSln0dtBobMFdzPKQ/MVgbhIU/qdMUMXbRpyRs=; b=xitT8tqMQoMGTLQxqBcDvq91VEfFsM2+Ee8wijqCm6AgV6QEv6LmJy7yN4t8WsEX6J /q/huSr8etq4VQrlCAiRz/hLCAp/8advGhAIC5U4y2vZ6aJpZItqxkhsTbJ4tI5BAx13 1/R1FatP8tW39V6C+C3YSjLlEmQFn6ocoP1H+Mv5h0JpNJ7WgkgcdfuTLdGvTj//BYQM boIM1MBDtW3TbPVLhnMxmPd7DJeV8fWPLdG3AzSXbhdoXLGsZnrwH85EMEYMewMFu5C9 1a5Vd7lw97kHc8a9KglcCqV2RHOn6gAvW7eVcGXEdIOjdPwKl+n6+15vqv03BjomsJej tDWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Yo5HQVlC; 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 bu22-20020a632956000000b0053074f3d6cbsi10682773pgb.97.2023.05.15.00.45.39; Mon, 15 May 2023 00:45:53 -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=Yo5HQVlC; 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 S239371AbjEOH05 (ORCPT + 99 others); Mon, 15 May 2023 03:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233348AbjEOH04 (ORCPT ); Mon, 15 May 2023 03:26:56 -0400 Received: from out-17.mta0.migadu.com (out-17.mta0.migadu.com [91.218.175.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5611C10D0 for ; Mon, 15 May 2023 00:26:49 -0700 (PDT) Date: Mon, 15 May 2023 03:26:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1684135607; 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=MiMXjQSln0dtBobMFdzPKQ/MVgbhIU/qdMUMXbRpyRs=; b=Yo5HQVlC5T/RlG0F1NWP61AQIcCBYkCdSZHYD/8ksY1fzx4GYr8jAZCkCoFZ9mjij8r5wY yc+vGtVq6FiqqbQ9ko1zj2ZfyajpGWAh9LjNtlTIgeBjnU9rT7JioXlndCvK44yEqWF6DI BpyHKJ5Sa1jkY/phUwXQ4KJRDbYu/wM= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Eric Biggers Cc: 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: <20230510064849.GC1851@quark.localdomain> <20230513015752.GC3033@quark.localdomain> <20230514184325.GB9528@sol.localdomain> <20230515061346.GB15871@sol.localdomain> <20230515071343.GD15871@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515071343.GD15871@sol.localdomain> 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=unavailable 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 Mon, May 15, 2023 at 12:13:43AM -0700, Eric Biggers wrote: > Sure, given that this is an optimization problem with a very small scope > (decoding 6 fields from a bitstream), I was hoping for something easier and > faster to iterate on than setting up a full kernel + bcachefs test environment > and reverse engineering 500 lines of shell script. But sure, I can look into > that when I have a chance. If you were actually wanting to help, that repository is the tool I use for kernel development and testing - it's got documentation. It builds a kernel, boots a VM and runs a test in about 15 seconds, no need for lifting that code out to userspace. > > Your approach wasn't any faster than the existing C version. > > Well, it's your implementation of what you thought was "my approach". It > doesn't quite match what I had suggested. As I mentioned in my last email, it's > also unclear that your new code is ever actually executed, since you made it > conditional on all fields being byte-aligned... Eric, I'm not an idiot, that was one of the first things I checked. No unaligned bkey formats were generated in my tests. The latest iteration of your approach that I looked at compiled to ~250 bytes of code, vs. ~50 bytes for the dynamically generated unpack functions. I'm sure it's possible to shave a bit off with some more work, but looking at the generated code it's clear it's not going to be competitive.