Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4136260rwb; Fri, 30 Sep 2022 13:27:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5amBR76jghfW4dmAWpUcMq1l7sG4im5brTWOp+4wGgZYnFQ4ZXVZdxPkdOavsFV//vbvsg X-Received: by 2002:a17:90a:2fc9:b0:202:5605:65ae with SMTP id n9-20020a17090a2fc900b00202560565aemr5872pjm.167.1664569634517; Fri, 30 Sep 2022 13:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664569634; cv=none; d=google.com; s=arc-20160816; b=t/r3Itqt1Vm7V1fMMP5kXVagrkYXTFRSCa/Y1f1riz4jgQnxBmQ7My1icSZ8udSkr8 57T5KvpydmmlRSN/7wrNInpB1weMYxmaWCaNEvKFlUyjavD/OQo3Xx/w57+R2h3U0xkz KaqLT6b5ugkNkQ0sYGLkt16V8QITIMColjC9mUZ2FxTUS9emb40mvmkopo8priuxqOZr bM62sKJns5a2H0io8FKf2Odxt83XpYH8R9RE7bjkeccelEkDnyH3BIqUHUCPtK/6+L9j yxto4oPyU4NgrDI4rGbkWXCfXUFzrn98iFNbzKAb612Fkes/ikwTNj1iJm0LXtjgQkJy 2JYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=8CE3Iabg2NpyHioPDddF/UlYh7dtUO0nVnT8qt44FKI=; b=c/6LSwdW5tshyQnInyGlhzOi7CaVU3a+5l4i9hpyBlU7815Oa7ujgs0BF3TyhQiKK2 lfLlrWp7KNi9XypYHCPJajTThqY5V6K3fPzc1PW0JNsoPv8ICiN+PB+g/80mEBMYrj+C Iei/PCnKCqyPHKX6mPceCr0ckOMbuG4PAVohex03w4lr8INPN1/MAK+s28mnJBgaVSCQ bsUTpdFTkKyufbXL/7VVIJYfBm3I8PaTm5rR+YhCa3e9ZQtctBmWEBGaTdC/gJrsgwIU SpJg60j0LNal962fQkdYsCFc++eAbxoJihysVAcPNsTAF1cdHpi5lricv9TZxzH8EyvS SqbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=IC84e+qg; 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 x15-20020a170902ec8f00b0017a07fc8d44si4293530plg.248.2022.09.30.13.26.48; Fri, 30 Sep 2022 13:27:14 -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=@linux-foundation.org header.s=google header.b=IC84e+qg; 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 S232351AbiI3Tgx (ORCPT + 99 others); Fri, 30 Sep 2022 15:36:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232041AbiI3Tg0 (ORCPT ); Fri, 30 Sep 2022 15:36:26 -0400 Received: from mail-oi1-x230.google.com (mail-oi1-x230.google.com [IPv6:2607:f8b0:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23BBF2D1F6 for ; Fri, 30 Sep 2022 12:36:05 -0700 (PDT) Received: by mail-oi1-x230.google.com with SMTP id j188so5777860oih.0 for ; Fri, 30 Sep 2022 12:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=8CE3Iabg2NpyHioPDddF/UlYh7dtUO0nVnT8qt44FKI=; b=IC84e+qgneQiadY8Da1KC/ooqTpFF7UZWB7qFQEKvywWBk74UdwDLIsNAhG/qWUz3/ UR22fTaoR10FzZzcDj3COGzOTQnHM5GAqAHvLhPmQuZDMk7XWJ/3j1FQ0wI3JD0vxoh+ RCmQDj0UW6zI1HUIR7hGP9y0aghmCZxDP8/mQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=8CE3Iabg2NpyHioPDddF/UlYh7dtUO0nVnT8qt44FKI=; b=rKex3RhjIN3Iu9DAEj5ZxTbT9PyqfNuB7aXV8eBRLp+xQvmzPY1sdJMk/L641wy07d e8Wm5Rt3isBm5RFT9yF0dVACNwgQZ2IdnK3KRh7X/XG5kAUip14Xii9pYiXoSmDiEoOb oyoG6aeSVxsnXEUxOhFIhZy55FSXf8KzPX8Nvwmnvzq+6EGz4i4pZjVJNqatjQ2nO0YM fBsrfVUyuCx1KIxo+33/Pn7YuKCIilJ1cx3NxgRM5B+0O0GweuzLGZpn2cbYbPbcRkYS JP6oWgyicHKnEN4q3VS1mKeQIM2I/xd0J3d0DS+In6eNkwyUVUO7G8VjghqZPe20ScOq 20lg== X-Gm-Message-State: ACrzQf3z1db8+DCSrc706tklC5lRWwvDfsEatGv8SgImQng7/7hKZ3Uo b8+qYUgivxdDqbKR+bF7KsIGstac4aNy9A== X-Received: by 2002:aca:1710:0:b0:34f:e8cd:68ff with SMTP id j16-20020aca1710000000b0034fe8cd68ffmr4495336oii.194.1664566563497; Fri, 30 Sep 2022 12:36:03 -0700 (PDT) Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com. [209.85.167.171]) by smtp.gmail.com with ESMTPSA id p21-20020a9d6955000000b00657a221eb71sm739062oto.65.2022.09.30.12.36.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 12:36:02 -0700 (PDT) Received: by mail-oi1-f171.google.com with SMTP id v130so5747268oie.2 for ; Fri, 30 Sep 2022 12:36:02 -0700 (PDT) X-Received: by 2002:aca:b957:0:b0:351:4ecf:477d with SMTP id j84-20020acab957000000b003514ecf477dmr4491126oif.126.1664566561733; Fri, 30 Sep 2022 12:36:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Fri, 30 Sep 2022 12:35:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN To: Catalin Marinas Cc: Isaac Manjarres , Herbert Xu , Ard Biesheuvel , Will Deacon , Marc Zyngier , Arnd Bergmann , Greg Kroah-Hartman , Andrew Morton , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "David S. Miller" , Saravana Kannan , kernel-team@android.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Fri, Sep 30, 2022 at 11:33 AM Catalin Marinas wrote: > > 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). May I suggest doing that "force bouncing" and "change kmalloc to have a 8-byte minalign" to be the two first commits? IOW, if we force bouncing for unaligned DMA, then that *should* mean that allocation alignment is no longer a correctness issue, it's purely a performance one due to the bouncing. So then the rest of the series should be about "ok, this is actually a hot enough allocation that I want to force alignment", and be purely about performance, not correctness. No? Linus