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 08314FA373D for ; Sun, 30 Oct 2022 08:44:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4438C6B0071; Sun, 30 Oct 2022 04:44:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3F38A6B0073; Sun, 30 Oct 2022 04:44:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E2DE6B0074; Sun, 30 Oct 2022 04:44:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1A9246B0071 for ; Sun, 30 Oct 2022 04:44:58 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id E0DDFA081A for ; Sun, 30 Oct 2022 08:44:57 +0000 (UTC) X-FDA: 80076980634.01.106AFBD Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf23.hostedemail.com (Postfix) with ESMTP id 29A9214000A for ; Sun, 30 Oct 2022 08:44:56 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 248C468AA6; Sun, 30 Oct 2022 09:44:51 +0100 (CET) Date: Sun, 30 Oct 2022 09:44:51 +0100 From: Christoph Hellwig To: Linus Torvalds Cc: Catalin Marinas , Greg Kroah-Hartman , Arnd Bergmann , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Christoph Hellwig , Isaac Manjarres , Saravana Kannan , linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 2/2] treewide: Add the __GFP_PACKED flag to several non-DMA kmalloc() allocations Message-ID: <20221030084451.GA5278@lst.de> References: <20221025205247.3264568-1-catalin.marinas@arm.com> <20221025205247.3264568-3-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667119497; a=rsa-sha256; cv=none; b=HToMc8ycjKYURObXhNBqOKecvvmpZcScVoEo0jnFUDq+y7c2KNZ9JSQo70WsNy3kxuSH4r BCQwplZgnzl7OEhMEuGsQARWHLZ3ryhhGR0GT5a/QPYnW6FedDRIpsMu1HjyzBAOG9uc7M KWfjgVyJKRwYaB0Dak/JrVxuWPLfUbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667119497; 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=5nFzp+2/nHcVXNOFJ6m7WY161WT3H5VPPyX+n7vmmMk=; b=RrGQL8FHOLMIoESeXn7amxHwf8mDuJyH501zRgVkA9MC8JXgK1t4yzM5iEnlvJV8jUXmuO GrDuT9k5Ro4WgV5A/epX7P9Z0KFdTmX0zzcfEe63iwENvy+mvIFGyCCvO+4Qkgb0ZLpy0G Sn+X90/4QVmKvZkUo4H/m8KIUlpGGI8= X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=none; spf=none (imf23.hostedemail.com: domain of hch@lst.de has no SPF policy when checking 213.95.11.211) smtp.mailfrom=hch@lst.de; dmarc=none X-Rspamd-Server: rspam07 X-Stat-Signature: smauit7xz3wfnqt5ptq67nd5ph8i1gsm X-Rspamd-Queue-Id: 29A9214000A X-HE-Tag: 1667119496-827930 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 Wed, Oct 26, 2022 at 10:46:46AM -0700, Linus Torvalds wrote: > Seriously, non-cache coherent DMA in 2022 is a sign of an incompetent > platform architect or hardware designer, and at some point I think > that should just be called out for the incredible garbage it is. It is garbage, but still incredibly common. And there is a simple reason for that: it's cheap. > I think we should just stop bending over backwards over this, and say > "if your DMA isn't coherent, it's on your driver to mark its > allocations". Many of the allocations do not come from the driver. They can be page cache, anonymous user memory, 17 layers of kernel "subsystems" above the actual driver. And while the first two usuall won't have size / alignment problems, the latter is where the real mess is.