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 2E1BAC433EF for ; Thu, 21 Apr 2022 14:47:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5F3F76B0074; Thu, 21 Apr 2022 10:47:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A3346B0075; Thu, 21 Apr 2022 10:47:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 443536B0078; Thu, 21 Apr 2022 10:47:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 36B9A6B0074 for ; Thu, 21 Apr 2022 10:47:44 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id F2B133605 for ; Thu, 21 Apr 2022 14:47:43 +0000 (UTC) X-FDA: 79381165206.07.B57762E Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) by imf15.hostedemail.com (Postfix) with ESMTP id 2F1C6A001C for ; Thu, 21 Apr 2022 14:47:41 +0000 (UTC) Received: from mail-wm1-f43.google.com ([209.85.128.43]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1Mi23L-1oL1iO39xx-00e2Ni for ; Thu, 21 Apr 2022 16:47:41 +0200 Received: by mail-wm1-f43.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso6056108wml.1 for ; Thu, 21 Apr 2022 07:47:41 -0700 (PDT) X-Gm-Message-State: AOAM530T2S5WTnpAILdxQ9awPYDBfMMn2GanpeO/GgVeTtqcSaLKYek1 QGBuiomoe0I2kVC2ccR38sojwp1uU5PmFdlUGx8= X-Google-Smtp-Source: ABdhPJxpfQyeJ8FFSSRAVYsP7tX4SxkGVm3S8a1k62CpNiV8J87SliJxnOrtPTeyRtS6VZ24MDqHdm2WtoHwOU8AJN4= X-Received: by 2002:a7b:ce15:0:b0:38e:b7b0:79be with SMTP id m21-20020a7bce15000000b0038eb7b079bemr8870300wmc.71.1650552461083; Thu, 21 Apr 2022 07:47:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Arnd Bergmann Date: Thu, 21 Apr 2022 16:47:24 +0200 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: Arnd Bergmann , Christoph Hellwig , Ard Biesheuvel , Herbert Xu , Will Deacon , Marc Zyngier , Greg Kroah-Hartman , Andrew Morton , Linus Torvalds , Linux Memory Management List , Linux ARM , Linux Kernel Mailing List , "David S. Miller" Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:0ZTWh/V81ftFdrq+8+ZQIAjQx3q4N3EEL0XpgDJ7acQOege36t9 Evxb7xJHkg4Wj4FjefTltULw6vHcrkHTKI4LmN7y3GeYIkMUbROuDU1mCHOg3sSufp2ICZV jx2WUDzEysFPzPhSzq7P1wSz4FIqIOaWDKBhVQQoLZAoO+WEFPa9FGPmWNI7ConDi+iXpGW ziUZDlgLPabVJoO1N45pQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:JKTlBye2UP8=:KAWNrvMbvyv3oM9KiiuLFY 2CUtOy2Enf+QrFeETq9tKMtUzahBrAyjRD912LqtoQJPfo2dWd2pCMDeu7LU15R8F1wkkbh3U h8AQaWOYn6eVrjmIDx2Qu1vsagLs1krOavHkCzcZzAcxhPc+10kgG7ENFZ807jGnNgbecJuEp cmC+rJ18nTXBmX2KyPHlD4BswWV8oXl6RxjKUQwf3jvlnn9CwCYq6OeNtLFENhQ+qfn5+FaCz JkXD4qieJbaVPZwJ4UiuN1hADF95WfO7Y0fNK7Y0e2DdBVoTXvCrporkKnpkHAwSpPedZBkk2 lg1ld/AA9Hg+VQZAkePujuIy3f3uLDNDVw3CZn3GHF5BM/dSaP+ZLV5IhUhd32L+5kmzhRRO7 kzGcEXe71wH2hN3XV2GQP1GE4O7vlfbWdZN1ZQs4eMxS1ykfvuw+N42kjx7RpnNuuF3NDb/3M EtWh6eZaNqWsXCskqhH1DVfwBLQS3EU27FtcD2Egt/bWcvJJ7JK0pP6Cf6QJtpRD33a9RpyTe 8n6v6oX8mFp8+uL2M7fYREV+lZuO9NOYTiF4qPldBR5EzulFPrSSXgI5ndnq6lqNX2KV9/4+e 2PH+TAH9gCWvRgmeysEksMlhYz/K3o/Z2HM+S1nG+iGtRcOaThGX5icdLbGXsOuy1YwXpt4/S isfeWTnZ7Veotcw413ltD+jrQKsy4MmUmdp3KfhgZc4ONY5nfPUSAXYk8LxjYTQLQmsnRZOIy u6lDAUk8//+Mhoyg6+vSCWNEFrfPq34pHRZOf9dvw0QDNwj4GZZd4I3iHW2e6sZW+lIHhmIa9 SOJn9aSKm6mzLjbQt1uL8M3Rrvzk2ri1rNmWinNRiLuaxXsQuA= X-Rspam-User: X-Rspamd-Server: rspam11 X-Rspamd-Queue-Id: 2F1C6A001C X-Stat-Signature: d7remhwj5zxdsf4idf9oj67hgrrofbk6 Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=none; spf=none (imf15.hostedemail.com: domain of arnd@arndb.de has no SPF policy when checking 217.72.192.75) smtp.mailfrom=arnd@arndb.de X-HE-Tag: 1650552461-696619 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 Thu, Apr 21, 2022 at 4:44 PM Catalin Marinas wrote: > On Thu, Apr 21, 2022 at 03:47:30PM +0200, Arnd Bergmann wrote: > > On Thu, Apr 21, 2022 at 3:25 PM Catalin Marinas wrote: > > > On Thu, Apr 21, 2022 at 02:28:45PM +0200, Arnd Bergmann wrote: > > > > We also know that larger slabs are all cacheline aligned, so simply > > > > comparing the transfer size is enough to rule out most, in this case > > > > any transfer larger than 96 bytes must come from the kmalloc-128 > > > > or larger cache, so that works like before. > > > > > > There's also the case with 128-byte cache lines and kmalloc-192. > > > > Sure, but that's much less common, as the few machines with 128 byte > > cache lines tend to also have cache coherent devices IIRC, so we'd > > skip the bounce buffer entirely. > > Do you know which machines still have 128-byte cache lines _and_ > non-coherent DMA? If there isn't any that matters, I'd reduce > ARCH_DMA_MINALIGN to 64 now (while trying to get to even smaller kmalloc > caches). I think the last time this came up, someone pointed out one of the Qualcomm Snapdragon phone chips with their custom cores. Arnd