Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4798969rwl; Mon, 3 Apr 2023 09:42:52 -0700 (PDT) X-Google-Smtp-Source: AKy350ZxembeCrpG3mtILmwsmezT1opftq4NeKIz98JojvwZqCXzn5iaRtMFcbpZsiq6sZiSzLZC X-Received: by 2002:a17:906:5d14:b0:92f:e7e2:b7b3 with SMTP id g20-20020a1709065d1400b0092fe7e2b7b3mr45255512ejt.5.1680540172192; Mon, 03 Apr 2023 09:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680540172; cv=none; d=google.com; s=arc-20160816; b=spyxSEkBErMAWRfiQ9DmO8piliPRyEaMfVKFcHXs6UZHE7KPWN07dOJPzTkDtCYnOV 45cnVd97K+ESp2g6NRFHO2cT1idGUmXiXIBmYPeGFjpCYkU1U2D87vAb/poO4uQDHEts DD430aG0KoudJdPF7JdztZ9ACAT/2TSc4/7WxRNM4N8zkgWQewPUtFs7yT+f0t8rFOWA ExaxEnFYfUbWlpRJEnIiiL0vKUCaMphIEvK0iaArSACpDz11zE8GbXILP2ywHQx3RfB4 RyCw98ax/nWf2YwPxiqxiIOgOk7CHGDONjSX5rJv4GtxIu5A8YBKHihAcn3uWgYY96HT 7LWg== 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=TLq/fee/rAnKhGEHWUNMA+5CkZ4Fztgv7aGPljQgyZM=; b=Rsb5ilQ5w1cc7aqphul23F8+3QgGPhYGwk/4iInk0bzBBLt4TuY/SHhdycezHksf8C fMbZdhpFt7GOnEbJ7E7QJbGbvMi6Bc6ghyBX0uxfrUhZvhuX3gXw634MGQ+YitXylVAm s6pdLSMUYPC7dFBIzvOhf35vsKVusosK682nJoEVbnIkHRuPDB4xRRbPN/Fs19H0jBUP Y3pw8pkC4jfz/V32zQiy8R5sgOaMuTBPPY5p2ctEbEUh8Pg+s9lXlXgD6sY5jLiAV1oZ 3FksR9jTg5WFEiR9rphF2DbE0CkHoJCZmj/TCBLh3e1ZHJZCCs/8UbdOmy6XJsVY4qwL dpHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=t5CDZlBc; 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 a9-20020aa7d749000000b004acda6e2e65si38024eds.43.2023.04.03.09.42.27; Mon, 03 Apr 2023 09:42:52 -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=t5CDZlBc; 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 S231549AbjDCQg3 (ORCPT + 99 others); Mon, 3 Apr 2023 12:36:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229780AbjDCQg2 (ORCPT ); Mon, 3 Apr 2023 12:36:28 -0400 Received: from out-15.mta1.migadu.com (out-15.mta1.migadu.com [95.215.58.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91BFF1721 for ; Mon, 3 Apr 2023 09:36:27 -0700 (PDT) Date: Mon, 3 Apr 2023 12:36:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1680539783; 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=TLq/fee/rAnKhGEHWUNMA+5CkZ4Fztgv7aGPljQgyZM=; b=t5CDZlBcBkXQiFf0dli4Jwe1z9f5aVC/6Okq/ur8yEOhvk10GavgoOLEaxOmXo+iLeQj8S 4TLHxF7QgVlQEtq6f5IPQ8MrmZK0qQUri9jG17kwKkoaFUk4eUxfIpqmm33SgCAf1IQkIh p86LNNAi4Pn7tIJ2oZ7++R7eDVd1wcY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, willy@infradead.org, axboe@kernel.dk Subject: Re: [PATCH 0/2] bio iter improvements Message-ID: References: <20230327174402.1655365-1-kent.overstreet@linux.dev> 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=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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, Apr 03, 2023 at 08:10:38AM -0700, Christoph Hellwig wrote: > On Tue, Mar 28, 2023 at 04:28:08PM -0400, Kent Overstreet wrote: > > > Can you post a code size comparism for the before and after cases? > > > > 6.2: > > kent@moria:~/linux$ size ktest-out/kernel_build.x86_64/vmlinux > > text data bss dec hex filename > > 13234215 5355074 872448 19461737 128f669 ktest-out/kernel_build.x86_64/vmlinux > > > > With patches: > > kent@moria:~/linux$ size ktest-out/kernel_build.x86_64/vmlinux > > text data bss dec hex filename > > 13234215 5355578 872448 19462241 128f861 ktest-out/kernel_build.x86_64/vmlinux > > So we have a slightly larger binary size, and a slighly larger source > code size. What is the overall benefit of this conversion? Data went up a bit because I added some asserts, yes. And it's also not uncommon for source code to grow a bit when you start focusing on readability instead of just playing code golf. And that was one of the main motivations - Matthew was complaining about the bio iter code being a pain in the ass when he did the bio folio iter code; additionally, I realized I could do a much cleaner and smaller version of bio_for_each_folio() with some refactoring of the existing code. But this was all right there in the original commit message. And to be honest Christoph, these kinds of drive by "let's focus on the easiest thing to measure" comments are what I expect from you at this point, but I don't find them to be super helpful. Reads like a typical MBA manager who just wants to focus on making their silly charts going up, instead of digging in and understanding what's going on. Was it your time in FinTech that you got that from...? If we want object size to go back down, we could - convert WARN_ONS() to BUG_ON()s (Linus won't like that) - drop the new assertions (_I_ wouldn't like that) - switch from inlines to out-of-line functions - this'll make text size go down vs. baseline, but if there's a performance impact Jens will care about that. Anyways, I've got a patch converting to out-of-line functions but I don't have as sensitive a performance testing setup as Jens does. If the patch is interesting to people - if Jens wants to perf test it or just take it - I'm happy to post it too.