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 55368FA373D for ; Sun, 30 Oct 2022 09:13:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A49248E0002; Sun, 30 Oct 2022 05:13:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9F7978E0001; Sun, 30 Oct 2022 05:13:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E70D8E0002; Sun, 30 Oct 2022 05:13:56 -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 7E0C28E0001 for ; Sun, 30 Oct 2022 05:13:56 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 4DE21120361 for ; Sun, 30 Oct 2022 09:13:56 +0000 (UTC) X-FDA: 80077053672.10.246E73C Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf01.hostedemail.com (Postfix) with ESMTP id 6CE0F40005 for ; Sun, 30 Oct 2022 09:13:53 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 7FCD568AA6; Sun, 30 Oct 2022 10:13:49 +0100 (CET) Date: Sun, 30 Oct 2022 10:13:49 +0100 From: Christoph Hellwig To: Greg Kroah-Hartman Cc: Christoph Hellwig , Catalin Marinas , Linus Torvalds , Arnd Bergmann , Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , 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: <20221030091349.GA5600@lst.de> References: <20221025205247.3264568-1-catalin.marinas@arm.com> <20221025205247.3264568-3-catalin.marinas@arm.com> <20221030084718.GC5278@lst.de> 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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1667121233; a=rsa-sha256; cv=none; b=S/howrgPOvZ+qne+sAvgiXJUSHGFkFnqYWI/YGB34UYkyhy/V7pfAKTGI4sbLyivTxa/LC /ZwaPL0HZmJ/tVEKo7H+EWP8VPnEw1TNSSvBdATbIM0Gh2lwchH/zERBaDZOKJEJL9r9Eh fJ3vtSsJ+SpZipAtnG4JF1Rkftv8LiI= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=none (imf01.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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1667121233; 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=lq6paHqOMJ3UYxZ7ITKTy066AS3W9Wn4VOG5v8opDNQ=; b=CECWf+o9KmVv0VQTyPQY2iM8pPXm9U6ffCzamq/3FvZhjNP2RCYFNxA8MPrt+0BgJ6hcze zB2kCkvubN3AsDZBDMoPHu7fpEF3IAA875u4XDBo8hP2tOiR1nhYxVk3AtPoAIaAypUv1q H/ZxBa2WAVwMUI4XtFE5LVb0+M68LOo= Authentication-Results: imf01.hostedemail.com; dkim=none; spf=none (imf01.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: rspam05 X-Rspamd-Queue-Id: 6CE0F40005 X-Stat-Signature: hib1gqq5mqg84jwrqnznncxxobjofg9d X-Rspam-User: X-HE-Tag: 1667121233-733357 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 30, 2022 at 10:02:53AM +0100, Greg Kroah-Hartman wrote: > Ah, my fault, sorry, you are right. Is there a sparse tag that just > means "enforce this void * type?" I guess we could do that with something > like: > typedef void *dmaptr; > > but that feels icky. That's because it is :) I find the concept of the DMA pointes pretty strange to be honest. It only affects a subset of dma (when devices are not attached in a DMA coherent way). So count me in as someone who would be much more happy about figuring out a way to simplify bounce buffer for non-coherent DMA if the start and length are not aligned to the cache line size over any kind of special annotation all over the kernel.