Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-15 Thread Luis R. Rodriguez
On Mon, May 14, 2018 at 07:35:03AM -0300, Mauro Carvalho Chehab wrote: > Hi Fabien, > > Em Mon, 14 May 2018 08:00:37 + > Fabien DESSENNE escreveu: > > > On 07/05/18 17:19, Mauro Carvalho Chehab wrote: > > > Em Mon, 07 May 2018 16:26:08 +0300 > > > Laurent Pinchart

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-15 Thread Mauro Carvalho Chehab
Hi Laurent, Em Tue, 15 May 2018 11:27:44 +0300 Laurent Pinchart escreveu: > Hello, > > On Tuesday, 15 May 2018 10:30:28 EEST Fabien DESSENNE wrote: > > On 14/05/18 12:39, Mauro Carvalho Chehab wrote: > > > Em Mon, 14 May 2018 07:35:03 -0300 Mauro Carvalho

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-15 Thread Laurent Pinchart
Hello, On Tuesday, 15 May 2018 10:30:28 EEST Fabien DESSENNE wrote: > On 14/05/18 12:39, Mauro Carvalho Chehab wrote: > > Em Mon, 14 May 2018 07:35:03 -0300 Mauro Carvalho Chehab escreveu: > >> Em Mon, 14 May 2018 08:00:37 + Fabien DESSENNE escreveu: > >>> On 07/05/18 17:19, Mauro Carvalho

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-15 Thread Fabien DESSENNE
On 14/05/18 12:39, Mauro Carvalho Chehab wrote: > Em Mon, 14 May 2018 07:35:03 -0300 > Mauro Carvalho Chehab escreveu: > >> Hi Fabien, >> >> Em Mon, 14 May 2018 08:00:37 + >> Fabien DESSENNE escreveu: >> >>> On 07/05/18 17:19, Mauro

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-14 Thread Mauro Carvalho Chehab
Em Mon, 14 May 2018 07:35:03 -0300 Mauro Carvalho Chehab escreveu: > Hi Fabien, > > Em Mon, 14 May 2018 08:00:37 + > Fabien DESSENNE escreveu: > > > On 07/05/18 17:19, Mauro Carvalho Chehab wrote: > > > Em Mon, 07 May 2018 16:26:08 +0300

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-14 Thread Mauro Carvalho Chehab
Hi Fabien, Em Mon, 14 May 2018 08:00:37 + Fabien DESSENNE escreveu: > On 07/05/18 17:19, Mauro Carvalho Chehab wrote: > > Em Mon, 07 May 2018 16:26:08 +0300 > > Laurent Pinchart escreveu: > > > >> Hi Mauro, > >> > >> On Saturday,

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-14 Thread Fabien DESSENNE
On 07/05/18 17:19, Mauro Carvalho Chehab wrote: > Em Mon, 07 May 2018 16:26:08 +0300 > Laurent Pinchart escreveu: > >> Hi Mauro, >> >> On Saturday, 5 May 2018 19:08:15 EEST Mauro Carvalho Chehab wrote: >>> There was a recent discussion about the use/abuse of

RE: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-09 Thread Yasunari.Takiguchi
Dear Mauro > -Original Message- > > There was a recent discussion about the use/abuse of GFP_DMA flag when > allocating memories at LSF/MM 2018 (see Luis notes enclosed). > > The idea seems to be to remove it, using CMA instead. Before doing that, > better to check if what we have on

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-07 Thread Mauro Carvalho Chehab
Em Mon, 07 May 2018 16:26:08 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Saturday, 5 May 2018 19:08:15 EEST Mauro Carvalho Chehab wrote: > > There was a recent discussion about the use/abuse of GFP_DMA flag when > > allocating memories at LSF/MM 2018

Re: Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-07 Thread Laurent Pinchart
Hi Mauro, On Saturday, 5 May 2018 19:08:15 EEST Mauro Carvalho Chehab wrote: > There was a recent discussion about the use/abuse of GFP_DMA flag when > allocating memories at LSF/MM 2018 (see Luis notes enclosed). > > The idea seems to be to remove it, using CMA instead. Before doing that, >

Are media drivers abusing of GFP_DMA? - was: Re: [LSF/MM TOPIC NOTES] x86 ZONE_DMA love

2018-05-05 Thread Mauro Carvalho Chehab
There was a recent discussion about the use/abuse of GFP_DMA flag when allocating memories at LSF/MM 2018 (see Luis notes enclosed). The idea seems to be to remove it, using CMA instead. Before doing that, better to check if what we have on media is are valid use cases for it, or if it is there

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 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 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 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