Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp9232830rwp; Thu, 20 Jul 2023 01:24:16 -0700 (PDT) X-Google-Smtp-Source: APBJJlFTUZuA1GvprNGuxS2V3c8SYi/ePPIw2c/lZhexRJ6kDJanH58L5dTUu6vBTApdyWK4vxlw X-Received: by 2002:a17:906:3f02:b0:988:9b29:5653 with SMTP id c2-20020a1709063f0200b009889b295653mr3265132ejj.77.1689841456643; Thu, 20 Jul 2023 01:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689841456; cv=none; d=google.com; s=arc-20160816; b=fYD6Qvbs2UGzVmgC9Fv1NqjOK4mgo5F4uklCGiq6XwYTa3ifrfSLW5mGZFjMgekf+U 0LnutVrvLOh7KzEbv8riqm/69kHhbynPgErUNw7wJpvQEg3PUHk2O+Og3rStWgzGjtyU 62wTYJ/zxMxEoofFH+zGDDafrvpQj7l7/l5o0ezNblS3Q83L1EIBFlB6/EwVIWb5QvuR o0M88k+HHxqJLreE/VtWvrY/zFWF/4vGcHkjqyhGIHHSNLoeypWctvsNb5Som2LheAmS x/y7R4yMO+L9iYt/e6BaWr/JKwjvRQ+1GWghZi69K6Mwam0akPiia4d02KcIC4SdiOP/ TLcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=bUhtJX4CcTGHzGGaxIbN239w7DEnojxe3dapUe5qf0Q=; fh=K+AqHgYRl0EeFK0LkJF4lWkjRojzETovX4qpZb+Y5UQ=; b=b5anQ/4Bo06jsNtl1v8lkDaixGj+pxJWRvLmTBcjcXnmAyCXmpRLOvuWeu6k9p9LSM ntFHawfwQu/b9QCSskw5W2hUJiZp0pF7FuSWGl946u+HSHrA65e9PhwCKy1nDMfuBz9H 2n3RmeLKzaz4wJ7tMZPCO+WWwseOMiWxsCAKGQfRcpaL387v53uVEvYiusaLx8P2TsKQ ejbEfdlMYkrsP/8cM0GDirYjnBFk5ZTjlh4LJ5+ZO0aeVvOYKPEdmxJPIZ/ZeO5o8ewm I3SLItHLMSlriNNUTZzn1CoscLuCpz/hni5gZC7GqQmVNRFA5wqVVcbfFPQc5ctJ7ZN+ vnYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tesarici.cz header.s=mail header.b=Ep2iGtb9; 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=tesarici.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x3-20020a170906804300b00987acac4c40si326848ejw.596.2023.07.20.01.23.51; Thu, 20 Jul 2023 01:24:16 -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=@tesarici.cz header.s=mail header.b=Ep2iGtb9; 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=tesarici.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229684AbjGTIN2 (ORCPT + 99 others); Thu, 20 Jul 2023 04:13:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230022AbjGTINZ (ORCPT ); Thu, 20 Jul 2023 04:13:25 -0400 Received: from bee.tesarici.cz (bee.tesarici.cz [IPv6:2a03:3b40:fe:2d4::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA0142684; Thu, 20 Jul 2023 01:13:24 -0700 (PDT) Received: from meshulam.tesarici.cz (dynamic-2a00-1028-83b8-1e7a-4427-cc85-6706-c595.ipv6.o2.cz [IPv6:2a00:1028:83b8:1e7a:4427:cc85:6706:c595]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bee.tesarici.cz (Postfix) with ESMTPSA id 6B344166DED; Thu, 20 Jul 2023 10:13:21 +0200 (CEST) Authentication-Results: mail.tesarici.cz; dmarc=fail (p=none dis=none) header.from=tesarici.cz DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tesarici.cz; s=mail; t=1689840801; bh=TdK9jcZL8v/p/laoEmi/zALu74q142SxfjUGyouwpT0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ep2iGtb9XwwVXdW8lVyOJuD+PoVmPwq3KvBPAUvyUMDZA5m9uc+OP56Pme9dHmPf9 LHSbVYWT2DwuGrfqg10tpCg+WHOsEUxLlBHB4rejKgW1xDrQmwKxTdgmNua/ZkIyCH xxGsUJzTMkwUtfhkUvu+WUcF93Rn0u2BhomMyok4HopTRqI6aPHQIsiOePlRk5yWQs 0rokk+4IQ42uMfAuxqVoxMGN1xbcL2Wy/NC1Kaac/sy0+W5qWYGX9kVu6KE8SRnLaq uU+Ds0EbmORD13mcMi4lyS/k6NmlLzUQvS2oeGXNiOQkSfvv6GsyoshWbeWeP6p6QB 9UMlHjGDhJ+XA== Date: Thu, 20 Jul 2023 10:13:20 +0200 From: Petr =?UTF-8?B?VGVzYcWZw61r?= To: Christoph Hellwig Cc: Petr Tesarik , 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 , 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 Subject: Re: [PATCH v4 0/8] Allow dynamic allocation of software IO TLB bounce buffers Message-ID: <20230720101320.72bbd2fc@meshulam.tesarici.cz> In-Reply-To: <20230720065216.GB4395@lst.de> References: <20230720065216.GB4395@lst.de> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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_PASS,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 Thu, 20 Jul 2023 08:52:16 +0200 Christoph Hellwig wrote: > 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. Fine with me. I removed it after all my testing showed no performance impact as long as the size of the initial SWIOTLB is kept at the default value (and sufficient for the workload), but it's OK for me if dynamic SWIOTLB allocations are off by default. OTOH I'd like to make it a boot-time option rather than build-time option. Would that be OK for you? Petr T