From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751625AbcAWGPX (ORCPT ); Sat, 23 Jan 2016 01:15:23 -0500 Received: from mail-yk0-f173.google.com ([209.85.160.173]:35781 "EHLO mail-yk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbcAWGPS (ORCPT ); Sat, 23 Jan 2016 01:15:18 -0500 MIME-Version: 1.0 In-Reply-To: References: <20160123044643.GA3709@sudip-pc> Date: Fri, 22 Jan 2016 22:15:17 -0800 Message-ID: Subject: Re: [BUG] Devices breaking due to CONFIG_ZONE_DEVICE From: Dan Williams To: Sudip Mukherjee Cc: Christoph Hellwig , "H. Peter Anvin" , Ingo Molnar , Dave Hansen , Rik van Riel , Mel Gorman , Jerome Glisse , markk@clara.co.uk, Joerg Roedel , Borislav Petkov , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2016 at 9:47 PM, Dan Williams wrote: > On Fri, Jan 22, 2016 at 8:46 PM, Sudip Mukherjee > wrote: >> Hi All, >> Commit 033fbae988fc ("mm: ZONE_DEVICE for "device memory"") has >> introduced CONFIG_ZONE_DEVICE while sacrificing CONFIG_ZONE_DMA. >> Distributions like Ubuntu has started enabling CONFIG_ZONE_DEVICE and >> thus breaking parallel port. Please have a look at >> https://bugzilla.kernel.org/show_bug.cgi?id=110931 for the bug report. >> >> Apart from parallel port I can see some sound drivers will also break. >> >> Now what is the possible solution for this? > > The tradeoff here is enabling direct-I/O for persistent memory vs > support for legacy devices. > > One possible solution is to alias ZONE_DMA and ZONE_DEVICE. At early > boot if pmem is detected disable these legacy devices, or the reverse > disable DMA to persistent memory if a legacy device is detected. The > latter is a bit harder to do as I think we would want to make the > decision early during memory init before we would know if any parallel > ports or ISA sound cards are present. ...another option that might be cleaner is to teach GFP_DMA to get memory from a different mechanism. I.e. don't use the mm-zone infrastructure to organize that small 16MB pool of memory.