Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1634316rwd; Mon, 15 May 2023 00:19:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7wzOyCxDwQt6ulJClvnxrRxnjwxvYwahE8pBZWbMDPRjtd03KGa6OkUIq8Rnj1PsLKVnxB X-Received: by 2002:a17:90a:ee88:b0:246:f8a8:af02 with SMTP id i8-20020a17090aee8800b00246f8a8af02mr31665894pjz.5.1684135145848; Mon, 15 May 2023 00:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684135145; cv=none; d=google.com; s=arc-20160816; b=KQzwFfZOGnIpIQmYDA+t0ld8dAfk6vxtDoSjsEdpmQF/UTOs1WIabe2O0KY+6wy+D4 3aKOP8wABMuq0bpbLjMxnoOgHBly1XFmvJ0wAfLDuFvsXKYBsgHGmlUPvz2Tw41888O2 GTQUXb0nhggzwlYLOucvy2cW/Meih/n7KuOsXiU6EIt30sgeLuUO8NKK/CMVGGgLmsCk 0bdMig5Ekyj2qgZ9QTn5gbT4m7eIu5qRCt8uKNUL5bCWsm1TSaX1bUnprXKjjjHTYAF3 2LejnAWQvSjaLUF5Ft/6rzHhRKZc4gzT2OIWrIAUHt1tHeNp1GjN0kWu9Xbjd9zCMwft LzGw== 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:date:dkim-signature; bh=EgvWtKrsSgH36u/g3MwJgM3xHSfuEEuf1LBdkMCMhJQ=; b=H4L9OVc0UB7Fb6jnDWBTdi/y+rCAQRBFvzRrsWPe6egHdsQpaZob3bFZNh5Po0g8TW JR3p2G28cI6U1s2xHjLnUlzxtLOjg8H/5b0L+1TFj8rtGiSmeoSVh4QXoJBgAbA76jiK DaLNmVJLbnuOfGSICWdcT1NOUvLorSijA19aE2VGyXts5tTTBVIXq/3LHenvtBAea3Xg Zp8mnPwGm547BY9lJbZTToxAMEKZlu03xa/PZNQs1qNcXtD44twAez8d+ymqfdiA2yY0 Sm2C+kG/iRpmvdfvBqI0NZJSWFuQm9MfNcZa9Eqkk9AC3L43suPYSEK1keaLan55hU9K RuXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="cb1/nGDI"; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a63fa49000000b0051bb415165dsi14816484pgk.194.2023.05.15.00.18.50; Mon, 15 May 2023 00:19:05 -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=@kernel.org header.s=k20201202 header.b="cb1/nGDI"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240544AbjEOHOE (ORCPT + 99 others); Mon, 15 May 2023 03:14:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240399AbjEOHN5 (ORCPT ); Mon, 15 May 2023 03:13:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCBFA171E; Mon, 15 May 2023 00:13:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E456F61048; Mon, 15 May 2023 07:13:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 156D9C433D2; Mon, 15 May 2023 07:13:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684134825; bh=Blp9UTVwqWg3TA5Q/aNLyv7una68PusuriG4Cx6TJ1I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cb1/nGDInJgxvoRAiPafNqmATmMoBlsuo3AOYZmbnMEWUu9D+/GzhbjwxdSL7KZgC poCnKGNOC6I2NebFqG89wbQBuyFdlzYsHlmL0tIzbvDH/YvmHuXrgODI1SREFX9L4s r7F8kHdWUCYiDtn8Nyxv3siipSh9+93pil61u1IpNHXbL8/N5Gb1dpQ/qb1Q17f1Jg djZaDbecgKuQZqXSVhkqwtOU+4e75+6S1PLqVYW3fQJXh2V7wo33rBp4rungohG/fO 5SByQ8uiE1Y2wRDoEYxnSuhpjAwRnM9zuRuGbWbXRIG/uXpG2+FRauo0FtweydTfxZ 59Mbo2AG7dWbA== Date: Mon, 15 May 2023 00:13:43 -0700 From: Eric Biggers To: Kent Overstreet 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: <20230515071343.GD15871@sol.localdomain> References: <20230510064849.GC1851@quark.localdomain> <20230513015752.GC3033@quark.localdomain> <20230514184325.GB9528@sol.localdomain> <20230515061346.GB15871@sol.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Mon, May 15, 2023 at 02:18:14AM -0400, Kent Overstreet wrote: > On Sun, May 14, 2023 at 11:13:46PM -0700, Eric Biggers wrote: > > On Mon, May 15, 2023 at 01:38:51AM -0400, Kent Overstreet wrote: > > > On Sun, May 14, 2023 at 11:43:25AM -0700, Eric Biggers wrote: > > > > I think it would also help if the generated assembly had the handling of the > > > > fields interleaved. To achieve that, it might be necessary to interleave the C > > > > code. > > > > > > No, that has negligable effect on performance - as expected, for an out > > > of order processor. < 1% improvement. > > > > > > It doesn't look like this approach is going to work here. Sadly. > > > > I'd be glad to take a look at the code you actually tried. It would be helpful > > if you actually provided it, instead of just this "I tried it, I'm giving up > > now" sort of thing. > > https://evilpiepirate.org/git/bcachefs.git/log/?h=bkey_unpack > > > I was also hoping you'd take the time to split this out into a userspace > > micro-benchmark program that we could quickly try different approaches on. > > I don't need to, because I already have this: > https://evilpiepirate.org/git/ktest.git/tree/tests/bcachefs/perf.ktest 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. > 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