Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp125844iof; Wed, 8 Jun 2022 17:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbbrWw8Ufoqx+Ee9JpkARnRsi0gUHBoYELhlVcXMKwqquR5AudJl2Igh+mnwn86+uMTLhV X-Received: by 2002:a05:6402:350e:b0:42f:b2c1:9393 with SMTP id b14-20020a056402350e00b0042fb2c19393mr31664458edd.11.1654733208561; Wed, 08 Jun 2022 17:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654733208; cv=none; d=google.com; s=arc-20160816; b=z7q6Xx3vyaw1MP1KimWa/7sAFoGSc9Tnma0kfcifyojdjDkZ0m5XxSSUo9d9C3E5CT S6Nn4JW3p+EB4JAAic7l1o2ZcaU+g/XLGv9fN+Bt1TIx/FWF/eIot+Zde23hFRues8SL I+n19DIKrz/9f3z6fgUv3ZpgvuqKpn1FNzefJlw2bNx2++r7dJZIZ1qz0mKKVQUFc/bP SkJ3z0A/8qE+lm3qrmAEA082uI/W+t7JX3wLdi10PnAme4Anm3oTuzQy8vlzjLa0O5GS mRbYD095bD0jgSAse24MMY6RAbKm2ruARNqYj+eDpzpGA8c/bIEg4deJv/HqRgNti6sg Je3g== 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 :message-id:subject:cc:to:from:date:dkim-signature; bh=jqqKIcLebs4yTzewype8dknsXXnhdke5SCNhzQvXQAY=; b=kavgFL/J2CY6D9F93hKNa+lwH8GjfckkGOIAe9k1yNL03u6KqVJtS8l/UJbWiMPTlv Imo93pV3JuPEoFKcOG+WFuHQkJNbdLYX+tyM8W6xdF5q3xxVG6i4rZDfw+KAn0yXnkS2 8reIyTfpHJ5R/GCczb0vOD69V/gNPNMrZk6ZH03gD/EBtGKe3oCA6UDUOYf46pQ1HNW7 CWHOTh6KivbRJ/WcHsuraMGRNy/q7itimoeoSdCRYgLCMdgS2S2prQ7v6gnleo5byHNC o+gvHAPipNA5natttm3FlJlKUT381o2JjePmffiHXH7C+ZHCjbcMBi+wQsEgnIoYk9XE Oryw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=InGtDqac; 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 hp21-20020a1709073e1500b006fe054471a4si17887083ejc.512.2022.06.08.17.06.19; Wed, 08 Jun 2022 17:06:48 -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=InGtDqac; 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 S234179AbiFHXmK (ORCPT + 99 others); Wed, 8 Jun 2022 19:42:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235144AbiFHXl5 (ORCPT ); Wed, 8 Jun 2022 19:41:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 995891AA17D; Wed, 8 Jun 2022 16:41:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id CA6F4B829F9; Wed, 8 Jun 2022 23:41:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19D42C3411E; Wed, 8 Jun 2022 23:41:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654731662; bh=8TesstUwyX400Czc4f/SvrGdHmpleWBYHpobEaZCwkE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=InGtDqacJmo8CM6l4lGtNFSqYRF/mp1WqAFeknGWsuvfBS9Gio9rSz/TDbEI9VoYW lq/1cpE72U11sAE/A76bYuzsaoWytZqKhexukpWwxlW/OJX1HCFHmRxAEUzfrYCcox K8gn4Qfl4aJIGB+qzccPQOekypKr4mCHM6bKwIG+vDFfwlbiuKx1TQ6dmkkaV1G5b3 SveEMin/ZOuGfatVXUe3wyYVmktytRcA0NepOcbpC5VSSMryzeRYteu2j8LPq9xW5g TG78VLvGMspHYQnuk4iYHa3/aPM3NHhE37V9kf29qHbUD2hr0V7COa2zi9MmuwFZfJ mtC/+JRlfJ3bQ== Date: Wed, 8 Jun 2022 18:40:59 -0500 From: Bjorn Helgaas To: Kent Overstreet Cc: linux-kernel@vger.kernel.org, pmladek@suse.com, rostedt@goodmis.org, linux-pci@vger.kernel.org, Logan Gunthorpe Subject: Re: [PATCH v3 29/33] PCI/P2PDMA: Convert to printbuf Message-ID: <20220608234059.GA434397@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Wed, Jun 08, 2022 at 07:24:02PM -0400, Kent Overstreet wrote: > On 6/8/22 17:11, Bjorn Helgaas wrote: > > On Sat, Jun 04, 2022 at 03:30:38PM -0400, Kent Overstreet wrote: > > > This converts from seq_buf to printbuf. We're using printbuf in external > > > buffer mode, so it's a direct conversion, aside from some trivial > > > refactoring in cpu_show_meltdown() to make the code more consistent. > > > > cpu_show_meltdown() doesn't appear in p2pdma.c. Leftover from another > > patch? Maybe from 27/33 ("powerpc: Convert to printbuf")? Don't forget this part :) > > I'm not opposed to this, but it would be nice to say what the benefit > > is. How is printbuf better than seq_buf? It's not obvious from the > > patch how this is better/safer/shorter/etc. > > > > Even the cover letter [1] is not very clear about the benefit. Yes, I > > see it has something to do with improving buffer management, and I > > know from experience that's a pain. Concrete examples of typical > > printbuf usage and bugs that printbufs avoid would be helpful. > > Take a look at the vsprintf.c conversion if you want to see big > improvements. Also, %pf() is another thing that's going to enable a lot more > improvements. Like I said, I'm not opposed to this, I'm just looking for a hint in this commit log that makes me think "yes, this is a good idea for PCI." Right now it just says "converts X to Y." I'm hoping for "convert X to Y to avoid ." Bjorn