From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756188AbcAHXUi (ORCPT ); Fri, 8 Jan 2016 18:20:38 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:49989 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754400AbcAHXUg (ORCPT ); Fri, 8 Jan 2016 18:20:36 -0500 Date: Fri, 8 Jan 2016 23:18:06 +0000 From: Russell King - ARM Linux To: Doug Anderson Cc: Robin Murphy , Tomasz Figa , Marek Szyprowski , Pawel Osciak , Dmitry Torokhov , Jonathan Corbet , Andrew Morton , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4 2/3] common: DMA-mapping: add DMA_ATTR_NOHUGEPAGE attribute Message-ID: <20160108231806.GP19062@n2100.arm.linux.org.uk> References: <1452213405-22942-1-git-send-email-dianders@chromium.org> <1452213405-22942-3-git-send-email-dianders@chromium.org> <20160108133545.GK19062@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 08, 2016 at 03:05:13PM -0800, Doug Anderson wrote: > 1. I have to go and touch all existing DMA-mapping code to set > DMA_ATTR_HUGE_PAGE. That will be a big patchset and touch more code, > making it more likely to break something. ... Indeed, I was actually thinking of a positive "prefer/only use/force smaller pages" thing rather than "allow huge pages" as a way to get rid of the "no huge pages" negative as a way to get around that. It has the same meaning when set as DMA_ATTR_NO_HUGE_PAGE but avoids the problem of wondering what !dma_get_attr(DMA_ATTR_NO_HUGE_PAGE, attrs) means. I wasn't thinking of DMA_ATTR_HUGE_PAGE as that would certainly be wrong when CONFIG_HAVE_DMA_ATTRS is disabled (when dma_get_attr() always returns 0.) -- RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.