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 58628C433FE for ; Fri, 30 Sep 2022 18:33:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4F8F6B0072; Fri, 30 Sep 2022 14:33:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFF7A8D0002; Fri, 30 Sep 2022 14:33:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEDFD8D0001; Fri, 30 Sep 2022 14:33:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id A106C6B0072 for ; Fri, 30 Sep 2022 14:33:01 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7E13FA0535 for ; Fri, 30 Sep 2022 18:33:01 +0000 (UTC) X-FDA: 79969598562.18.9AED8B5 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf14.hostedemail.com (Postfix) with ESMTP id 0894B100015 for ; Fri, 30 Sep 2022 18:32:59 +0000 (UTC) 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 1441AB82880; Fri, 30 Sep 2022 18:32:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E60BAC433D6; Fri, 30 Sep 2022 18:32:53 +0000 (UTC) Date: Fri, 30 Sep 2022 19:32:50 +0100 From: Catalin Marinas To: Isaac Manjarres Cc: Herbert Xu , Ard Biesheuvel , Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "David S. Miller" , Saravana Kannan , kernel-team@android.com Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664562780; 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: in-reply-to:in-reply-to:references:references; bh=k/0Nxdz9tGB0iLdXsLdMt7rMNWjVsO88a2oNDTiuuHo=; b=uY8/7s1flnT0tqEwV3bwPliLUvfcP2JZXe3LcPKOTRfck2qvI6qd8PxUPiDm7QAP6GZZOE AIhmuMoFGtvMB/GkzPdqysMfHkmg0zVB1Dio6syE+x+mO77AgI8zz17S7XlUHaIK6KbL3r LkAYWD7SNXs/oe94tN9W+CUG2Z46jZ0= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf14.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664562780; a=rsa-sha256; cv=none; b=HMZDCfA8X6BdWims//z/KYXU2ddig5czE1cmCB+/AYXKRS/D89/S3xouwlDI/A5vBzcV2Y QIpQeiPmBro+71aomhFRlMV+O2Jg+o4g8fGFuZTqM57lVLuI0RSCyWZucX/dRy33qqHo3a TQDVH0084iXcQgUPLcYkAaGAyfFJOC0= Authentication-Results: imf14.hostedemail.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=arm.com (policy=none); spf=pass (imf14.hostedemail.com: domain of cmarinas@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=cmarinas@kernel.org X-Rspam-User: X-Stat-Signature: arceujaouizjqk7kmtbkyykiu11ayi8f X-Rspamd-Queue-Id: 0894B100015 X-Rspamd-Server: rspam08 X-HE-Tag: 1664562779-537251 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 Tue, Sep 20, 2022 at 05:47:33PM -0700, Isaac Manjarres wrote: > On Mon, Jul 18, 2022 at 06:53:43PM +0100, Catalin Marinas wrote: > > So do I but holidays get in the way ;). I plan to refresh my kmalloc > > minalign series at the end of August. > > > > One significant change I have though is that now ARCH_KMALLOC_MINALIGN > > now goes down all the way to 8 and using swiotlb bounce buffering if the > > DMA mapping size is small. > > This sounds like a good idea for optimizing kmalloc's memory usage > beyond what this series originally achieved. I'm sure a few other things > have come up in the meantime, but I was curious to know if you had a > chance to get back to this? I started refreshing the series but I got stuck on having to do bouncing for small buffers even if when they go through the iommu (and I don't have the set up to test it yet). I hope to post something when the merging window closes. In the meantime, I pushed my work-in-progress patches to: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux devel/kmalloc-minalign-v2-wip Apart from the iommu think, I still need to figure out whether with an ARCH_DMA_MINALIGN of 128 we need to disable the kmalloc-192 cache (so far I don't think it's needed). There are no additional changes to the crypto code from the last series, I still set CRYPTO_MINALIGN to ARCH_DMA_MINALIGN (without any other patches, crypto DMA will break; so I need to see how it interacts with Herbert's series). Anyway, I hope for more discussions once 6.1-rc1 is out. -- Catalin