Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2265337rwl; Thu, 13 Apr 2023 04:12:34 -0700 (PDT) X-Google-Smtp-Source: AKy350aeDK6rLN7+AnsGnVwVxbMhEW4Mc1A/wMvOf6qMpoOS8j70KRI81dU1rlxaLaKQffHcewEj X-Received: by 2002:a05:6a20:bf22:b0:d5:6e91:f019 with SMTP id gc34-20020a056a20bf2200b000d56e91f019mr1726702pzb.33.1681384353686; Thu, 13 Apr 2023 04:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681384353; cv=none; d=google.com; s=arc-20160816; b=pwcYA4H/EzVpmN9x1d+Ote/w8QNr8CA+BX90fjrbmfGAPJsQR/U4+dboK3qwwfFnHp t3yprreZjRN/OLw9PTxg8QsxrdRnuzI4ONtTrSvk4gZsRAvnrz52YilqK4nbTpcB2BRi GwLtfOAaNx7KPZFLHUmvSCXSclyB+LXMBtbOMEXfst/bv2R30Zr0eyyBqbJSqnOss/mW PkdROj+h295jjOyCvSQs/ydtX6yG7GU9h4lSFRClv/YiuezB0vyWcjxqX6giMdFrMC9t ++7QBsG0xkgAVq/T6elRZ12Q4lBC22XCD68oZpKkv7ow0r4UcbmAUaTT03i9VbyTFNRw 5aBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=lFoqzGY1hxwoDBJ1VZgRLlTmy7m4CWgH5DEz75sLgeA=; b=Fo8h3ftrwYQa31TSby9buIisWHbAXFViqleZeXpPkCMOI3nfoDGe7zs+7sNLIt0Rs/ HduGX/5uH8a7v5SFw2SAnE0phyODr5Ph91Kz29otlxBUTRR4Kg9E377WGCDkiKuTRBPe sNbe3jssaIrAymUAYQon0PZfAkpBgEoWbCzU0xecPdP25ZjlVwEJ8JStsokzaNjLDFcG BbeaW9xHfYxzBE/wkIkzYBdHTcHqfHfd9Whshvq04mK7sXU41XBuMHRq/dD9SdqFfP0m 4BKcjjbQATz4ylsfTuQPv8p/StAT443puhaD4PWaSGppjfqcytOskN4SMT5Wa7qderFy eu9g== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l185-20020a6391c2000000b0051b4a135853si1671216pge.686.2023.04.13.04.12.19; Thu, 13 Apr 2023 04: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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjDMLJ5 (ORCPT + 99 others); Thu, 13 Apr 2023 07:09:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjDMLJz (ORCPT ); Thu, 13 Apr 2023 07:09:55 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 241CB7D9E; Thu, 13 Apr 2023 04:09:50 -0700 (PDT) Received: from frapeml500002.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4PxxcV34P2z6J6xl; Thu, 13 Apr 2023 19:07:22 +0800 (CST) Received: from [10.81.209.180] (10.81.209.180) by frapeml500002.china.huawei.com (7.182.85.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Thu, 13 Apr 2023 13:09:47 +0200 Message-ID: Date: Thu, 13 Apr 2023 13:09:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RFC v1 3/4] swiotlb: Allow dynamic allocation of bounce buffers Content-Language: en-US To: Christoph Hellwig CC: Jonathan Corbet , Marek Szyprowski , Robin Murphy , Borislav Petkov , "Paul E. McKenney" , Andrew Morton , Randy Dunlap , Damien Le Moal , Kim Phillips , "Steven Rostedt (Google)" , "open list:DOCUMENTATION" , open list , "open list:DMA MAPPING HELPERS" , Roberto Sassu , Alexander Graf References: <0334a54332ab75312c9de825548b616439dcc9f5.1679309810.git.petr.tesarik.ext@huawei.com> <20230328040724.GB25506@lst.de> <4268fa4e-4f0f-a2f6-a2a5-5b78ca4a073d@huaweicloud.com> <8cf7c515-9ce6-a2ed-0643-972aa3eba2fb@huaweicloud.com> <20230407055704.GD6803@lst.de> <20230407121555.4290a011@meshulam.tesarici.cz> From: Petr Tesarik In-Reply-To: <20230407121555.4290a011@meshulam.tesarici.cz> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.81.209.180] X-ClientProxiedBy: frapeml500008.china.huawei.com (7.182.85.71) To frapeml500002.china.huawei.com (7.182.85.205) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 4/7/2023 12:15 PM, Petr Tesařík wrote: > On Fri, 7 Apr 2023 07:57:04 +0200 > Christoph Hellwig wrote: >[...]>> (Btw, in case anyone is interested, we really need to get started >> on moving the dma fields out of struct device into a sub-struct >> only allocated for DMA capable busses) > > I like this idea. In fact, my WIP topic branch now moves the swiotlb > fields into a separate struct, but I can surely go further and move all > DMA-related fields. I have looked into this now, and it looks like a nice cleanup. The challenge is to get these patches reviewed by all affected maintainers, and it would be blocking my work on dynamically allocated bounce buffers. How about moving only some fields initially (coherent override, cma and swiotlb)? These few are not used outside kernel/dma, but at least the swiotlb part makes my patches easier to follow. I can move the rest as soon as the dynamic patch series is merged. Petr Tesarik