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 08D44C433F5 for ; Sun, 2 Oct 2022 22:25:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 589838E0002; Sun, 2 Oct 2022 18:25:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 537F58E0001; Sun, 2 Oct 2022 18:25:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D8208E0002; Sun, 2 Oct 2022 18:25:19 -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 2C1BB8E0001 for ; Sun, 2 Oct 2022 18:25:19 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D65B31202D5 for ; Sun, 2 Oct 2022 22:25:18 +0000 (UTC) X-FDA: 79977441516.07.D276519 Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) by imf04.hostedemail.com (Postfix) with ESMTP id 798924000B for ; Sun, 2 Oct 2022 22:25:18 +0000 (UTC) Received: by mail-oo1-f48.google.com with SMTP id r136-20020a4a378e000000b004755953bc6cso5701144oor.13 for ; Sun, 02 Oct 2022 15:25:18 -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=dR/X9l0lxZzftkXi0hIc+Z30CqHGBUwODF6JHMoE75I=; b=MSpfgdmNrHP6zveBI9mWR68eGv0BRvGksivODMJJpfETfN24A1neVDT12oNaYpaSgn GhqGS53NmLxOdHlQNljW83ANFBeiEPL66uZcaahVbUBtF6FtQ6FCmrOvC6rEzc13AWEr a08avLaoXQRjngX9jCDLM5Pa4IfHWjmq4rUOE= 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=dR/X9l0lxZzftkXi0hIc+Z30CqHGBUwODF6JHMoE75I=; b=WwMFRUkAX6eAop9b8stiirfJOBHB37RGCjKG/7kw75nNUXQieUSua3jJxhsXpBD32k tWgBVLKLBm8Txqp8umX8FuDEjhA4MEnmvkrLMDMzwTyGksPYfn4uE63cbobZkveOA6v/ AckvqSHLgQ9znEt0egKxJNoYwD+aqrZyFFST9yGLDjIEGi3Ix2C/iGLM6bs6xuY3E4gD 6OoNfuMHuJI/ZumiJFO8A04Ev0exdiZu4d9R9+3Mhg7LnubCiiKyN8YMekWxixQzN/fl L8MF9y4nh3jLOgnSRoW94ckiIVUcFynw49sZKS+Lw2aOWTpOUchWwm5S9SZ2GsI6xnPv +/FQ== X-Gm-Message-State: ACrzQf1LowX6m0o8PtA4B+ul9G9bFzbld34A9w2ubhZOvgR3WDpHKZsR 7IAe2mDMkzc/dlxS52ZKyHZDi6yIjeYYkQ== X-Google-Smtp-Source: AMsMyM4awbIanZDVR+pZJ1EaVvQSJJT0wijiqXdYPuJMcwvGbYi+UvbaHe520YsRr/7pEIlvGjyp9A== X-Received: by 2002:a9d:6458:0:b0:657:90f0:9c49 with SMTP id m24-20020a9d6458000000b0065790f09c49mr7014614otl.50.1664749516996; Sun, 02 Oct 2022 15:25:16 -0700 (PDT) Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com. [209.85.161.50]) by smtp.gmail.com with ESMTPSA id x65-20020a9d37c7000000b0065bf42c967fsm2004773otb.19.2022.10.02.15.25.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Oct 2022 15:25:14 -0700 (PDT) Received: by mail-oo1-f50.google.com with SMTP id m11-20020a4aab8b000000b00476743c0743so5708217oon.10 for ; Sun, 02 Oct 2022 15:25:13 -0700 (PDT) X-Received: by 2002:a05:6830:11c6:b0:65f:913:ff93 with SMTP id v6-20020a05683011c600b0065f0913ff93mr2678421otq.69.1664749513629; Sun, 02 Oct 2022 15:25:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Sun, 2 Oct 2022 15:24:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 07/10] crypto: Use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN To: Ard Biesheuvel Cc: Catalin Marinas , Isaac Manjarres , Herbert Xu , 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" ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=MSpfgdmN; spf=pass (imf04.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.161.48 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664749518; a=rsa-sha256; cv=none; b=XbsD255pCZaduoEWZ2WqPQ3LQNRyiogh9IkqLRMuoUV+GpnUhjUE4KXJiePglWzyWhbqSV 5XC3guYVfscF5y7axhmffpqcMdZ5jA1ejeCE0XtmGJ3qJGjZCXI0HBpZFVLGMkd3qO0C32 ypWGgGTfHpsb1IMI8uVkoG/hYmZfyZk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664749518; 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:dkim-signature; bh=dR/X9l0lxZzftkXi0hIc+Z30CqHGBUwODF6JHMoE75I=; b=7BPfNR30I+7VCxTaavhYYXO/fwujJ/rCNeIy89p7SJGT0nZ3hIDavewOV496Iaf7EIGTqC A573yqmedCF4Fl1lraYWb3sS+ADniRkq0+38MM8vekaVdfej94ZqPE09lSa3KBmq27kh8t +5be06f8vf4vl9vxGEbdaAUsos2TdsI= X-Rspam-User: Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=google header.b=MSpfgdmN; spf=pass (imf04.hostedemail.com: domain of torvalds@linuxfoundation.org designates 209.85.161.48 as permitted sender) smtp.mailfrom=torvalds@linuxfoundation.org; dmarc=none X-Rspamd-Server: rspam10 X-Stat-Signature: rb7eibuoatxkzrk9z6trz7oj7gi5r7r6 X-Rspamd-Queue-Id: 798924000B X-HE-Tag: 1664749518-627745 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 Sun, Oct 2, 2022 at 3:09 PM Ard Biesheuvel wrote: > > Non-coherent DMA for networking is going to be fun, though. I agree that networking is likely the main performance issue, but I suspect 99% of the cases would come from __alloc_skb(). You might want to have help from the network drivers for the "allocate for RX vs TX", since it ends up having very different DMA coherence issues, as you point out. The code actually already has a SKB_ALLOC_RX flag, but despite the name it doesn't really mean what you'd think it means. Similarly, that code already has magic stuff to try to be cacheline-aligned for accesses, but it's not really for DMA coherency reasons, just purely for performance reasons (trying to make sure that the header accesses stay in one cacheline etc). And to be honest, it's been years and years since I did any networking, so... Linus