From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC515C77B73 for ; Thu, 20 Apr 2023 09:52:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4483E900004; Thu, 20 Apr 2023 05:52:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3D168900002; Thu, 20 Apr 2023 05:52:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 271FE900004; Thu, 20 Apr 2023 05:52:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 13725900002 for ; Thu, 20 Apr 2023 05:52:11 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id C3E26AC2D0 for ; Thu, 20 Apr 2023 09:52:10 +0000 (UTC) X-FDA: 80701303620.04.BDD7EFD Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by imf30.hostedemail.com (Postfix) with ESMTP id 1AE8A8000C for ; Thu, 20 Apr 2023 09:52:07 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of Petr.Tesarik.ext@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=Petr.Tesarik.ext@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681984328; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aruofhAT6zXE/LobAevUD/co5CwW4qEYYm5nJzgSm+I=; b=u5GFerDpY/BbDPYQ2RNiHsDkezM5zKUEt8rGlhQA1uSTk7buT/JiEW+Q68eUQTEBNIFYIu xszTpRmzGsypj6OCOQrXDkbwt39B4+NvjzXvj9Ucf1wzOJ76JHFrpDoezBPqEO3uDHxIuS kzZp5liNX3CDbGaDnRbvwqNpwmCvLD4= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=none; spf=pass (imf30.hostedemail.com: domain of Petr.Tesarik.ext@huawei.com designates 185.176.79.56 as permitted sender) smtp.mailfrom=Petr.Tesarik.ext@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681984328; a=rsa-sha256; cv=none; b=uh9Ipdr6YXGJ89U1BDXO1lH136oSonryvXr7sMbymXnLUqQh2EqevHqknFrHFX9NPOWsb5 qG6x8bmmMwUPQYQZzKaLX3Hv4LEMVQ5LuYsD5IsUwPMfnJGG/HlSAasRA1UClHiSQBlP3Y faN4K/IR3V+UQSYUZQIFWgmGOP+De18= Received: from frapeml500002.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Q2Cb10mrTz67LmL; Thu, 20 Apr 2023 17:50:53 +0800 (CST) Received: from [10.81.207.102] (10.81.207.102) 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, 20 Apr 2023 11:52:01 +0200 Message-ID: <66a67d9e-70ce-9e2c-3b23-2d49447c4f24@huawei.com> Date: Thu, 20 Apr 2023 11:52:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v3 00/13] mm, dma, arm64: Reduce ARCH_KMALLOC_MINALIGN to 8 To: Catalin Marinas , Isaac Manjarres CC: Linus Torvalds , Arnd Bergmann , Christoph Hellwig , Greg Kroah-Hartman , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , Robin Murphy , , , References: <20221106220143.2129263-1-catalin.marinas@arm.com> Content-Language: en-US From: Petr Tesarik In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.81.207.102] X-ClientProxiedBy: frapeml500004.china.huawei.com (7.182.85.22) To frapeml500002.china.huawei.com (7.182.85.205) X-CFilter-Loop: Reflected X-Stat-Signature: ce5yppqmtf1kfari1gjy5kngagkpifrt X-Rspam-User: X-Rspamd-Queue-Id: 1AE8A8000C X-Rspamd-Server: rspam06 X-HE-Tag: 1681984327-978598 X-HE-Meta: U2FsdGVkX19T52+bNM5OCj0SeT7XUNl+MC5XFpoeJjIHP9gWx7js73ESJv4U1uToJViS0EwUbE7yEGT+znXYjWjQRRNCggt4Zr4dcvnUw8Qn8mBAGA24Wtd6z3nmiHKxseQAYL8k6CipsYIuIHbBR7UczqHgecMVbrYuE5n8kNUXFNCKR5WCrz1GqsyosV1FV/VeISuGCeBUEwosPHSLWMk5hgNIGs7w50SSsn/6kG+9Jbdzf/GhKikFF1jYNB2wDGosgzVRVvIChqrzGWOG9GUuZ0gEpVMkSt/Nr1uXuuCAUYEWvGGhTEGQcI6NFE3atFo/0XyE4EbCZWff7pLNcMu731bjpO7rlZUpj6clkmo1PDhsdpp7XjpnaA8bJzlXPCvhMY5nEcdkZ5abiUPM9KvkSjB0ZA4EdTeIJ5MyewbTsYaM4SDZBqmABRtvlPppTs1+fU6PRskngmcGyUNCeqyJH5pOEzrecJAH/jo4cQEr0j/H24wB2KGMjmHqO9rI4tj6xOdxtQQ28mplkjjhnXoXiFBga9DG/xSmCfczJeatN5ugb856zcVsWaXl89uAnbM2KUxo+RIGJuwVHcEvmH4sdeE6/cJ+DhpPzvIKC0tmIR+tAxSudgES+wV/8OMltYGuG3Mb1CqApe4fIm7DcQeHLtZgNwqlNqc6ZBF5Jd76KlqriD8ebR+MN5QXpbSsKh5xDTkQkY5Iq9rTAaVqRFcTh7hSEBmmvf/t6DWFyKzGFkPFjj1E1Z2fMWcp5IC0RVGA10cCCXzRTqnXFl+as56f/3Cr265euyxBi+n09+03pV85QTh2PvKKNQ9UWPfeq9kraN6fGM6IYT5ED9E83LSmKMhlOia8QvF0C3wW8/GJwWsCpzq0Qmr/zB0Q/a+jTkmYYEDf+snEWlwA5PoZ5G1ZbAKYpQmSDtjlsFsT1fvhKHnL+zRUykVDB+3bzXV+NFWo6vtX257OYBX6NZk Ci94sh+E VmFZon4+/JtELF9rpzk+bWRuYK0uvjwiux0Mxoe9TB25As9yJODMGsdCWCc7UJ8ZjbBlmFlpbL1/o9mtiy4Ct5oaDgAldtUm/4fjoc2rNJfPMWf+Xyv7nY30KJ+IeWp+gFxtVG0trr9982gaUAo6TiWFlHQj2+/zxDtIUvT03aQteRlCa/XPID4RVaFpqEey3mWWb X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 4/19/2023 6:06 PM, Catalin Marinas wrote: > On Thu, Mar 16, 2023 at 11:38:47AM -0700, Isaac Manjarres wrote: >[...]>> Given this, I don't think there's anything blocking this series from >> being merged. The requirement for SWIOTLB to get to the minimum >> kmalloc alignment down to 8 bytes shouldn't prevent this series from >> being merged, as the amount of memory that is allocated for SWIOTLB >> can be configured through the commandline to minimize the impact of >> having SWIOTLB memory. Additionally, even if no SWIOTLB is present, >> this series still offers memory savings on a lot of ARM64 platforms >> by using the cache line size as the minimum alignment for kmalloc. > > Actually, there's some progress on the swiotlb front to allow dynamic > allocation. I haven't reviewed the series yet (I wasn't aware of it > until v2) but at a quick look, it limits the dynamic allocation to > bouncing buffers of at least a page size. Maybe this can be later > improved for buffers below ARCH_DMA_MINALIGN. Indeed. My patch allocates dynamic bounce buffers with dma_direct_alloc_pages() to keep things simple for now, but there is no real reason against allocating less than a page with another suitable allocator. However, I'd be interested what the use case is, so I can assess the performance impact, which depends on workload, and FYI it may not even be negative. ;-) Petr Tesarik