Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1523217imu; Thu, 22 Nov 2018 18:12:51 -0800 (PST) X-Google-Smtp-Source: AFSGD/W20gL+M4AGQ3wV4u3O0LS33XZD2Za6booBx84IHmyvxZB/3hJVZLa2qalyXDi42CARN0r2 X-Received: by 2002:a63:f844:: with SMTP id v4mr12148008pgj.82.1542939171102; Thu, 22 Nov 2018 18:12:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542939171; cv=none; d=google.com; s=arc-20160816; b=sXk2tCxRLLTAW9kKqgAgrGtvlL/DmMx7ALVN0eMPNMPhkY6Y047x1fUN2x2YQH7y/1 WKEqxrm9OFLMWW7wYKoetgA9OnN56zEy/S87yWU2jbWEToaqxPVxpK4C7L3NODRvL7Kg gawqSqIcfzbqjiePeo/YlIfwbNYg/iBmuebmx6tmrQhbxsuoxHaOMl+AFbgp+RQADYLW ujPtT1ngUUhn+KaPCog4uSB+/UuswFVKXBkvfBS/A/CcLfKLhdJ68R257UpUh32Onjl1 JMTm8Zwkt9qW45kbENFmm5z3Xj+DzFucUlATaIlLzL0QKQRidUhsm1k3ybIpiK50/hgQ U94A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=N78RD0fDMD9ZumajMmltGxJe9lJJI+9OMTunJ+nAHXE=; b=bIpFX2JQ4idhyfAe9ohoRdiZyzhDuY9UbA0TVz88kAEDmaMab+pKGUz8jQp7kR5KBY YT1x9oOs/Ki7H7Hd2NoZwtSmtgmV7vmephgmqftnf3j42Fx0lWekugMLohVmQnhy1ENA rZa+qKknG3am0CPgjfBAiWxRIiiOJ4eGRKNB8fW7D7+IT7jr1r7Q1lF3ZZ5tyhIs2mCD pVz6/OCnhwXdvB95CA746FP3CTNgAyxIRFk1X2WebpJsdReuSHSpXYlY9LtKSNxfvgGW 1aG296Gl6mb2Qk4SLH5oVs1vG/FtzHc+bHXEAJTtena+1Ybhcf26wiigl6s4gbD4bJCx feoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nWkUOjDm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66si7762713pfk.73.2018.11.22.18.12.19; Thu, 22 Nov 2018 18:12:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=nWkUOjDm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392926AbeKVTCJ (ORCPT + 99 others); Thu, 22 Nov 2018 14:02:09 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:39648 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727486AbeKVTCJ (ORCPT ); Thu, 22 Nov 2018 14:02:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=N78RD0fDMD9ZumajMmltGxJe9lJJI+9OMTunJ+nAHXE=; b=nWkUOjDm1IFY/HRfdmUMMNlIP 50kfSaIEjvvAzIBUBierIqForfAkEDuZED9loTM+dyVq9cvA1L82I28APn3uSP2IsGnePMFYO8KoQ WwqgjBG79riwYkej+eVeQZeJghS+l9bVMARVF8Ebu6EPkOp3OT6w2AbZBOxWaZk/psiiVP9lT63xC 7h6s2umK8d08OtifchSJp4s5P9MbH0yIMZIkyaGKJbHyWF66ii88VI9rnc9wC+YnOmVNPPQZkr3U9 1F+fSk7Jlo8VOuTsbSQiszqLZSqhoS6jy/HsMgJIOV85iEhHbOtcAzXKWl4vIXO6eojf4HNzeKiYC 0nu4Qxszg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPkGu-0001i5-Ij; Thu, 22 Nov 2018 08:23:36 +0000 Date: Thu, 22 Nov 2018 00:23:36 -0800 From: Christoph Hellwig To: Robin Murphy Cc: Matthew Wilcox , Christopher Lameter , Levin Alexander , Mike Rapoport , Nicolas Boichat , Huaisheng Ye , Tomasz Figa , Will Deacon , linux-kernel@vger.kernel.org, Pekka Enberg , linux-mm@kvack.org, iommu@lists.linux-foundation.org, Michal Hocko , linux-arm-kernel@lists.infradead.org, David Rientjes , Matthias Brugger , yingjoe.chen@mediatek.com, Joonsoo Kim , Mel Gorman , Andrew Morton , Vlastimil Babka Subject: Re: [PATCH v2 0/3] iommu/io-pgtable-arm-v7s: Use DMA32 zone for page tables Message-ID: <20181122082336.GA2049@infradead.org> References: <20181111090341.120786-1-drinkcat@chromium.org> <0100016737801f14-84f1265d-4577-4dcf-ad57-90dbc8e0a78f-000000@email.amazonses.com> <20181121213853.GL3065@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 21, 2018 at 10:26:26PM +0000, Robin Murphy wrote: > TBH, if this DMA32 stuff is going to be contentious we could possibly just > rip out the offending kmem_cache - it seemed like good practice for the > use-case, but provided kzalloc(SZ_1K, gfp | GFP_DMA32) can be relied upon to > give the same 1KB alignment and chance of succeeding as the equivalent > kmem_cache_alloc(), then we could quite easily make do with that instead. Neither is the slab support for kmalloc, not do kmalloc allocations have useful alignment apparently (at least if you use slub debug). But I do agree with the sentiment of not wanting to spread GFP_DMA32 futher into the slab allocator. I think you want a simple genalloc allocator for this rather special use case.