Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-03 Thread Christoph Hellwig
On Thu, May 03, 2018 at 02:03:38PM +0200, Michal Hocko wrote: > On Sat 28-04-18 19:10:47, Matthew Wilcox wrote: > > Another way we could approach this is to get rid of ZONE_DMA. Make GFP_DMA > > a flag which doesn't map to a zone. Rather, it redirects to a separate > > allocator. At boot, we hand

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-03 Thread Michal Hocko
On Sat 28-04-18 19:10:47, Matthew Wilcox wrote: > Another way we could approach this is to get rid of ZONE_DMA. Make GFP_DMA > a flag which doesn't map to a zone. Rather, it redirects to a separate > allocator. At boot, we hand all memory under 16MB to the DMA allocator. The > DMA allocator can

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-03 Thread Geert Uytterhoeven
Hi Luis, On Thu, Apr 26, 2018 at 11:54 PM, Luis R. Rodriguez wrote: > x86 implicit and explicit ZONE_DMA users > - > > We list below all x86 implicit and explicit ZONE_DMA users. > > # Explicit x86 users of GFP_DMA or __GFP_DMA > > *

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-29 Thread Julia Lawall
Here are some improved results, also taking into account the pci functions. julia too small: drivers/gpu/drm/i915/i915_drv.c:1138: 30 too small: drivers/hwtracing/coresight/coresight-tmc.c:335: 0 too small: drivers/media/pci/sta2x11/sta2x11_vip.c:859: 29 too small:

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Matthew Wilcox
On Sat, Apr 28, 2018 at 09:46:52PM +0200, Julia Lawall wrote: > FWIW, here is my semantic patch and the output - it reports on things that > appear to be too small and things that it doesn't know about. > > What are the relevant pci wrappers? I didn't find them. Basically all of the functions

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Julia Lawall
On Sat, 28 Apr 2018, Luis R. Rodriguez wrote: > On Sat, Apr 28, 2018 at 01:42:21AM -0700, Christoph Hellwig wrote: > > On Fri, Apr 27, 2018 at 04:14:56PM +, Luis R. Rodriguez wrote: > > > Do we have a list of users for x86 with a small DMA mask? > > > Or, given that I'm not aware of a tool

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Luis R. Rodriguez
On Sat, Apr 28, 2018 at 01:42:21AM -0700, Christoph Hellwig wrote: > On Fri, Apr 27, 2018 at 04:14:56PM +, Luis R. Rodriguez wrote: > > 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

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 04:14:56PM +, Luis R. Rodriguez wrote: > 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? On a KVM guest probably none. But not all the world is relatively sane and standardized

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 11:36:23AM -0500, Christopher Lameter wrote: > On Fri, 27 Apr 2018, Matthew Wilcox wrote: > > > Some devices have incredibly bogus hardware like 28 bit addressing > > or 39 bit addressing. We don't have a good way to allocate memory by > > physical address other than than

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 11:07:07AM -0500, Christopher Lameter wrote: > Well it looks like what we are using it for is to force allocation from > low physical memory if we fail to obtain proper memory through a normal > channel. The use of ZONE_DMA is only there for emergency purposes. > I think

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-28 Thread Christoph Hellwig
On Fri, Apr 27, 2018 at 09:18:43AM +0200, Michal Hocko wrote: > > On Thu, Apr 26, 2018 at 09:54:06PM +, 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, and you actually explain later why it it BS

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Michal Hocko
On Fri 27-04-18 11:07:07, Cristopher Lameter wrote: > On Fri, 27 Apr 2018, Michal Hocko wrote: > > > On Thu 26-04-18 22:35:56, Christoph Hellwig wrote: > > > On Thu, Apr 26, 2018 at 09:54:06PM +, Luis R. Rodriguez wrote: > > > > In practice if you don't have a floppy device on x86, you don't

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Christopher Lameter
On Fri, 27 Apr 2018, Matthew Wilcox wrote: > Some devices have incredibly bogus hardware like 28 bit addressing > or 39 bit addressing. We don't have a good way to allocate memory by > physical address other than than saying "GFP_DMA for anything less than > 32, GFP_DMA32 (or GFP_KERNEL on

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Matthew Wilcox
On Fri, Apr 27, 2018 at 04:14:56PM +, Luis R. Rodriguez wrote: > > 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" That's an upper level driver, like cdrom, disk and regular tapes. > *

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Matthew Wilcox
On Fri, Apr 27, 2018 at 11:07:07AM -0500, Christopher Lameter wrote: > Well it looks like what we are using it for is to force allocation from > low physical memory if we fail to obtain proper memory through a normal > channel. The use of ZONE_DMA is only there for emergency purposes. > I think

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Christopher Lameter
On Fri, 27 Apr 2018, Michal Hocko wrote: > On Thu 26-04-18 22:35:56, Christoph Hellwig wrote: > > On Thu, Apr 26, 2018 at 09:54:06PM +, 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, and you

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Luis R. Rodriguez
On Thu, Apr 26, 2018 at 10:35:56PM -0700, Christoph Hellwig wrote: > On Thu, Apr 26, 2018 at 09:54:06PM +, 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

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-27 Thread Michal Hocko
On Thu 26-04-18 22:35:56, Christoph Hellwig wrote: > On Thu, Apr 26, 2018 at 09:54:06PM +, 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, and you actually explain later why it it BS due > to some drivers

Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-26 Thread Christoph Hellwig
On Thu, Apr 26, 2018 at 09:54:06PM +, 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, and you actually explain later why it it BS due to some drivers using it more explicitly. But even more importantly we have

Re: [Lsf-pc] [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-26 Thread Rik van Riel
On Thu, 2018-04-26 at 21:54 +, Luis R. Rodriguez wrote: > Below are my notes on the ZONE_DMA discussion at LSF/MM 2018. There > were some > earlier discussion prior to my arrival to the session about moving > around > ZOME_DMA around, if someone has notes on that please share too :) We took

[LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-04-26 Thread Luis R. Rodriguez
Below are my notes on the ZONE_DMA discussion at LSF/MM 2018. There were some earlier discussion prior to my arrival to the session about moving around ZOME_DMA around, if someone has notes on that please share too :) PS. I'm not subscribed to linux-mm Luis Determining you don't need to