From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753892AbbCBPwL (ORCPT ); Mon, 2 Mar 2015 10:52:11 -0500 Received: from g4t3425.houston.hp.com ([15.201.208.53]:2735 "EHLO g4t3425.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbbCBPwJ (ORCPT ); Mon, 2 Mar 2015 10:52:09 -0500 Message-ID: <1425311491.17007.165.camel@misato.fc.hp.com> Subject: Re: [PATCH v2 0/7] Kernel huge I/O mapping support From: Toshi Kani To: Ingo Molnar Cc: Andrew Morton , hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, arnd@arndb.de, linux-mm@kvack.org, x86@kernel.org, linux-kernel@vger.kernel.org, Elliott@hp.com Date: Mon, 02 Mar 2015 08:51:31 -0700 In-Reply-To: <20150224080927.GB19069@gmail.com> References: <1423521935-17454-1-git-send-email-toshi.kani@hp.com> <20150223122224.c55554325cc4dadeca067234@linux-foundation.org> <20150224080927.GB19069@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2015-02-24 at 09:09 +0100, Ingo Molnar wrote: > * Andrew Morton wrote: > > > > > > > Oh. We don't do any checking at all. We're just telling > > userspace programmers "don't do that". hrm. What are > > your thoughts on adding the overlap checks to the kernel? > > I have requested such sanity checking in previous review as > well, it has to be made fool-proof for this optimization to > be usable. > > Another alternative would be to make this not a transparent > optimization, but a separate API: ioremap_hugepage() or so. > > The devices and drivers dealing with GBs of remapped pages > is still relatively low, so they could make explicit use of > the API and opt in to it. > > What I was arguing against was to make it a CONFIG_ option: > that achieves very little in practice, such APIs should be > uniformly available. I was able to come up with simple changes that fall back to 4KB mappings when a target range is covered by MTRRs. So, with the changes, it is now safe to enable huge page mappings to ioremap() transparently without such restriction. I will post updated patchset hopefully soon. Thanks, -Toshi