Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9174360rwp; Thu, 20 Jul 2023 00:12:34 -0700 (PDT) X-Google-Smtp-Source: APBJJlEsM9CjyvPEqzkywQv+hqqbdzJcQi8Z2X/dHFtyVp9fUA1cNYSTq+yMbn+ddtdmOpYDZHgG X-Received: by 2002:aa7:d689:0:b0:521:db8b:b077 with SMTP id d9-20020aa7d689000000b00521db8bb077mr577601edr.4.1689837153878; Thu, 20 Jul 2023 00:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689837153; cv=none; d=google.com; s=arc-20160816; b=bekyEzgs96Wf04IHY/s5EiSrcjSpVA9FsM1PYsVLSCuxinfvLFsCnQMpQOKcNQxCWL mQ/muW78v2zU0wsrU/LeneAjEN1IrZlD9UrnXAT4ThYqHjm0VYMhR5Ny71SmfcuApbIT bBFA4gGBHBFRGmW8Wg3KmjU11j9+6jcHXiB6odD83zFu5Rb5jzkoeXEoFliXzUj0oG7Z 5Tx7xOH2LQIhWjKGyJmcSskNJJn9gz7U76WEDagMPUDMCCwPybV3a6Bc3O+HDauleY9g 1FtD6oj/VUq7othnvHJLcUX9HNYUIlGe05xGRulnhH5Ab4KRSPzXWowX3sV7PjIS76bJ AamA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tNbKlm4XcLCoMUcoWkIJuglbzmhFHPmrRd5yem4Nq7Q=; fh=ZUw18KJiJzFgOIjNQkZuBfwlEPPRV5ZrzvLpNlqPGmo=; b=NzK+hc0xs8VtiWFYO/3muwpXNDHkAtJm96PEa+IKpfPjtqCQMj/QZqkf9xbMxQwE8K fMZ7ZTK6v3FvrOHg44vapwCZp1tvOvPGaPCekLnUBDHGXpwdxNP7ArpYHhSpcQoID3KY h20RTM7V0GIETUnJMZBUGIDKKsZgOX+Kzj/O/XC4c7bI/5ZHLoQ8oxYObLiQDzfEm2r2 2rMynFBPvrXAJKF7XD3N2EuGredwED7kd5TsBafsNYPmrIwzWZQRKRWmTslXKMH4vNcD kqWiyZQwnNg/F6wVZZnVXAfZLDpcmJcZtthrQgo9Qd5SiQCcH8a09IvVRQBzATfbrdXN 0DtA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n5-20020aa7c785000000b0052177c077fbsi418459eds.484.2023.07.20.00.12.10; Thu, 20 Jul 2023 00:12:33 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231220AbjGTGwY (ORCPT + 99 others); Thu, 20 Jul 2023 02:52:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229687AbjGTGwX (ORCPT ); Thu, 20 Jul 2023 02:52:23 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58C429E; Wed, 19 Jul 2023 23:52:22 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id 666CB67373; Thu, 20 Jul 2023 08:52:16 +0200 (CEST) Date: Thu, 20 Jul 2023 08:52:16 +0200 From: Christoph Hellwig To: Petr Tesarik Cc: Stefano Stabellini , Russell King , Thomas Bogendoerfer , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Greg Kroah-Hartman , "Rafael J. Wysocki" , Juergen Gross , Oleksandr Tyshchenko , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Petr Tesarik , Jonathan Corbet , Andy Shevchenko , Hans de Goede , James Seo , James Clark , Kees Cook , "moderated list:XEN HYPERVISOR ARM" , "moderated list:ARM PORT" , open list , "open list:MIPS" , "open list:XEN SWIOTLB SUBSYSTEM" , Roberto Sassu , Kefeng Wang , petr@tesarici.cz Subject: Re: [PATCH v4 0/8] Allow dynamic allocation of software IO TLB bounce buffers Message-ID: <20230720065216.GB4395@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,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 Just to add a highlevel comment here after I feel like I need a little more time to review the guts. I'm still pretty concerned about the extra list that needs to be consulted in is_swiotlb_buffer, but I can't really think of anything better. Maybe an xarray has better cache characteristics, but that one requires even more allocations in the low-level dma map path. One thing I'd like to see for the next version is to make the new growing code a config option at least for now. It is a pretty big change of the existing swiotlb behavior, and I want people to opt into it conciously. Maybe we can drop the option again after a few years once everything has settled.