Received: by 10.192.165.148 with SMTP id m20csp901048imm; Fri, 27 Apr 2018 09:16:32 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrXSsGJ7jjmhNn2gXzKeZrYIZ+heX9jw+ffvi6ndaQP9zxHndye2Ukb/MRz/G88SwQGrSUf X-Received: by 10.98.247.17 with SMTP id h17mr2688839pfi.165.1524845792129; Fri, 27 Apr 2018 09:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524845792; cv=none; d=google.com; s=arc-20160816; b=VvqFfX9gOwgm/gVfu0Of9OhQdgjEV/wvIlK0cihROLd4R0dtE1X7CDBqz+SJH865gF 19eIP0WbmKE10rbt4PTTHbAX9PfrUoJumbgGOfPQ8VZA+9JhXGmtgshXfHF8CcnkBMvM BeGmBewvPd8HVFN/WxEeI66lUO1FH/TpJs7ryRcFeusv85L5j2PP4aVWGYKvLGrx1NOK vEeiS+dSpIFmiE6rFJs6Yr1sSfiPozab5VSIaW3ZP8yy4Og6RJJPgKpORwWgo/lDS7rU Q1cVAfN+GUknOTiNFlZX5Fs9AFj0VuZCWa+A8Kagp+kTfW/KtALaSyr9CwL4Mjvuc4Pu tPKw== 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:arc-authentication-results; bh=Oo2YtLYxzY6UVI87h/xK753bJ/LnKPtbkWtKqbH2Afs=; b=dHdZVR2SLabeXuaLaiG6lIV66Ogjz22TnEEGNPw9gz4qNDrEyVrOySXqps6oEMzhay YA38WI3qtEa6J9j/mjrF0qZkKEmmDeskNqgryhk9KavoNwLbPN8HffgnhHj38xEKQPdV PLt2Aw68hsCPQIcdjEc6hk8+cLdHUzTF+XUKaIMlcZtakHTMbvUcKWalixO0TpLwSSvH osF+vMAdd6vZoQmK1Zly9e73WvF6PO3XpyAixzVtJmTO+t5HiTA0SpAgd7glxKoFVqCV kxHICwFyDnen7c1y+3fvqDdVULieP/ckx9No2gnams1KZh5SWqUga83ZKk6lcBLKXSGj fCCA== ARC-Authentication-Results: i=1; mx.google.com; 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 o10-v6si1455373pgs.410.2018.04.27.09.16.18; Fri, 27 Apr 2018 09:16:32 -0700 (PDT) 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; 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 S1758595AbeD0QPE (ORCPT + 99 others); Fri, 27 Apr 2018 12:15:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:44319 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757985AbeD0QO6 (ORCPT ); Fri, 27 Apr 2018 12:14:58 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 1A901AC7F; Fri, 27 Apr 2018 16:14:57 +0000 (UTC) Date: Fri, 27 Apr 2018 16:14:56 +0000 From: "Luis R. Rodriguez" To: Christoph Hellwig Cc: "Luis R. Rodriguez" , linux-mm@kvack.org, mhocko@kernel.org, cl@linux.com, Jan Kara , matthew@wil.cx, x86@kernel.org, luto@amacapital.net, martin.petersen@oracle.com, jthumshirn@suse.de, broonie@kernel.org, Juergen Gross , linux-spi@vger.kernel.org, Joerg Roedel , linux-scsi@vger.kernel.org, Dan Carpenter , linux-kernel@vger.kernel.org, "lsf-pc@lists.linux-foundation.org" Subject: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love Message-ID: <20180427161456.GD27853@wotan.suse.de> References: <20180426215406.GB27853@wotan.suse.de> <20180427053556.GB11339@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180427053556.GB11339@infradead.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 26, 2018 at 10:35:56PM -0700, Christoph Hellwig wrote: > On Thu, Apr 26, 2018 at 09:54:06PM +0000, Luis R. Rodriguez wrote: > > In practice if you don't have a floppy device on x86, you don't need ZONE_DMA, > > I call BS on that, I did not explain though that it was not me who claimed this though. The list displayed below is the result of trying to confirm/deny this, and what could be done, and also evaluating if there is *any* gain about doing something about it. But curious, on a standard qemu x86_x64 KVM guest, which of the drivers do we know for certain *are* being used from the ones listed? What about Xen guests, I wonder? > and you actually explain later why it it BS due > to some drivers using it more explicitly. Or implicitly. The list I showed is the work to show that the users of GFP_DMA on x86 is *much* more wide spread than expected from the above claim. I however did not also answer the above qemu x86_64 question, but would be good to know. Note I stated that the claim was *in practice*. > But even more importantly > we have plenty driver using it through dma_alloc_* and a small DMA > mask, and they are in use Do we have a list of users for x86 with a small DMA mask? Or, given that I'm not aware of a tool to be able to look for this in an easy way, would it be good to find out which x86 drivers do have a small mask? > - we actually had a 4.16 regression due to them. Ah what commit was the culprit? Is that fixed already? If so what commit? > > SCSI is *severely* affected: > > Not really. We have unchecked_isa_dma to support about 4 drivers, Ah very neat: * CONFIG_CHR_DEV_OSST - "SCSI OnStream SC-x0 tape support" * CONFIG_SCSI_ADVANSYS - "AdvanSys SCSI support" * CONFIG_SCSI_AHA1542 - "Adaptec AHA1542 support" * CONFIG_SCSI_ESAS2R - "ATTO Technology's ExpressSAS RAID adapter driver" > and less than a hand ful of drivers doing stupid things, which can > be fixed easily, and just need a volunteer. Care to list what needs to be done? Can an eager beaver student do it? > > That's the end of the review of all current explicit callers on x86. > > > > # dma_alloc_coherent_gfp_flags() and dma_generic_alloc_coherent() > > > > dma_alloc_coherent_gfp_flags() and dma_generic_alloc_coherent() set > > GFP_DMA if if (dma_mask <= DMA_BIT_MASK(24)) > > All that code is long gone and replaced with dma-direct. Which still > uses GFP_DMA based on the dma mask, though - see above. And that's mostly IOMMU code, on the alloc() dma_map_ops. Luis