Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-14 Thread Michal Hocko
On Sun 11-02-18 15:51:07, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 04:05:15AM -0800, Matthew Wilcox wrote: > > On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > > > Now, longer-term, perhaps we should do the following: > > > > > > #ifdef CONFIG_ZONE_DMA32 > > > #define

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-14 Thread Michal Hocko
On Sun 11-02-18 15:51:07, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 04:05:15AM -0800, Matthew Wilcox wrote: > > On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > > > Now, longer-term, perhaps we should do the following: > > > > > > #ifdef CONFIG_ZONE_DMA32 > > > #define

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-12 Thread Michal Hocko
[I am crawling over a large backlog after vacation so I will get to other emails in this thread later. Let's just fix the regression first. The patch with the full changelog is at the end of this email. CC Andrew - the original report is

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-12 Thread Michal Hocko
[I am crawling over a large backlog after vacation so I will get to other emails in this thread later. Let's just fix the regression first. The patch with the full changelog is at the end of this email. CC Andrew - the original report is

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 04:05:15AM -0800, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > > Now, longer-term, perhaps we should do the following: > > > > #ifdef CONFIG_ZONE_DMA32 > > #define OPT_ZONE_DMA32 ZONE_DMA32 > > #elif defined(CONFIG_64BIT) >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 04:05:15AM -0800, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > > Now, longer-term, perhaps we should do the following: > > > > #ifdef CONFIG_ZONE_DMA32 > > #define OPT_ZONE_DMA32 ZONE_DMA32 > > #elif defined(CONFIG_64BIT) >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > Now, longer-term, perhaps we should do the following: > > #ifdef CONFIG_ZONE_DMA32 > #define OPT_ZONE_DMA32ZONE_DMA32 > #elif defined(CONFIG_64BIT) > #define OPT_ZONE_DMA OPT_ZONE_DMA > #else > #define OPT_ZONE_DMA32

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 03:28:08AM -0800, Matthew Wilcox wrote: > Now, longer-term, perhaps we should do the following: > > #ifdef CONFIG_ZONE_DMA32 > #define OPT_ZONE_DMA32ZONE_DMA32 > #elif defined(CONFIG_64BIT) > #define OPT_ZONE_DMA OPT_ZONE_DMA > #else > #define OPT_ZONE_DMA32

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 10:26:52AM +0100, Michal Hocko wrote: > On Thu 08-02-18 15:20:04, Matthew Wilcox wrote: > > ... nevertheless, 19809c2da28a does in fact break vmalloc_32 on 32-bit. > > Look: > > > > #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) > > #define GFP_VMALLOC32

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Matthew Wilcox
On Sun, Feb 11, 2018 at 10:26:52AM +0100, Michal Hocko wrote: > On Thu 08-02-18 15:20:04, Matthew Wilcox wrote: > > ... nevertheless, 19809c2da28a does in fact break vmalloc_32 on 32-bit. > > Look: > > > > #if defined(CONFIG_64BIT) && defined(CONFIG_ZONE_DMA32) > > #define GFP_VMALLOC32

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Michal Hocko
On Thu 08-02-18 15:20:04, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 05:06:49AM -0800, Matthew Wilcox wrote: > > On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > > > A user with i386 instead of AMD64 machine reports [1] that commit > > > 19809c2da28a ("mm, vmalloc: use

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-11 Thread Michal Hocko
On Thu 08-02-18 15:20:04, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 05:06:49AM -0800, Matthew Wilcox wrote: > > On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > > > A user with i386 instead of AMD64 machine reports [1] that commit > > > 19809c2da28a ("mm, vmalloc: use

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-09 Thread Matthew Wilcox
On Fri, Feb 09, 2018 at 05:12:56PM +0800, Kai Heng Feng wrote: > Hi Matthew, > > > On Feb 9, 2018, at 12:08 PM, Matthew Wilcox wrote: > > Alternatively, try this. It passes in GFP_DMA32 from vmalloc_32, > > regardless of whether ZONE_DMA32 exists or not. If ZONE_DMA32

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-09 Thread Matthew Wilcox
On Fri, Feb 09, 2018 at 05:12:56PM +0800, Kai Heng Feng wrote: > Hi Matthew, > > > On Feb 9, 2018, at 12:08 PM, Matthew Wilcox wrote: > > Alternatively, try this. It passes in GFP_DMA32 from vmalloc_32, > > regardless of whether ZONE_DMA32 exists or not. If ZONE_DMA32 doesn't > > exist, then

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-09 Thread Kai Heng Feng
Hi Matthew, On Feb 9, 2018, at 12:08 PM, Matthew Wilcox wrote: Alternatively, try this. It passes in GFP_DMA32 from vmalloc_32, regardless of whether ZONE_DMA32 exists or not. If ZONE_DMA32 doesn't exist, then we clear it in __vmalloc_area_node(), after using it to

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-09 Thread Kai Heng Feng
Hi Matthew, On Feb 9, 2018, at 12:08 PM, Matthew Wilcox wrote: Alternatively, try this. It passes in GFP_DMA32 from vmalloc_32, regardless of whether ZONE_DMA32 exists or not. If ZONE_DMA32 doesn't exist, then we clear it in __vmalloc_area_node(), after using it to determine that we

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 03:20:04PM -0800, Matthew Wilcox wrote: > So ... we could enable ZONE_DMA32 on 32-bit architectures. I don't know > what side-effects that might have; it's clearly only been tested on 64-bit > architectures so far. > > It might be best to just revert 19809c2da28a and the

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 03:20:04PM -0800, Matthew Wilcox wrote: > So ... we could enable ZONE_DMA32 on 32-bit architectures. I don't know > what side-effects that might have; it's clearly only been tested on 64-bit > architectures so far. > > It might be best to just revert 19809c2da28a and the

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 05:06:49AM -0800, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > > A user with i386 instead of AMD64 machine reports [1] that commit > > 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a > > regression. > >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 05:06:49AM -0800, Matthew Wilcox wrote: > On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > > A user with i386 instead of AMD64 machine reports [1] that commit > > 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a > > regression. > >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Laura Abbott
On 02/08/2018 10:18 AM, Matthew Wilcox wrote: On Thu, Feb 08, 2018 at 09:56:42AM -0800, Laura Abbott wrote: +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c @@ -77,7 +77,7 @@ static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, pg = vmalloc_to_page(virt);

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Laura Abbott
On 02/08/2018 10:18 AM, Matthew Wilcox wrote: On Thu, Feb 08, 2018 at 09:56:42AM -0800, Laura Abbott wrote: +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c @@ -77,7 +77,7 @@ static struct scatterlist *videobuf_vmalloc_to_sg(unsigned char *virt, pg = vmalloc_to_page(virt);

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 09:56:42AM -0800, Laura Abbott wrote: > > +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c > > @@ -77,7 +77,7 @@ static struct scatterlist > > *videobuf_vmalloc_to_sg(unsigned char *virt, > > pg = vmalloc_to_page(virt); > > if (NULL == pg) > >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 09:56:42AM -0800, Laura Abbott wrote: > > +++ b/drivers/media/v4l2-core/videobuf-dma-sg.c > > @@ -77,7 +77,7 @@ static struct scatterlist > > *videobuf_vmalloc_to_sg(unsigned char *virt, > > pg = vmalloc_to_page(virt); > > if (NULL == pg) > >

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Laura Abbott
On 02/08/2018 05:06 AM, Matthew Wilcox wrote: On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: A user with i386 instead of AMD64 machine reports [1] that commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a regression. BUG_ON(PageHighMem(pg)) in

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Laura Abbott
On 02/08/2018 05:06 AM, Matthew Wilcox wrote: On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: A user with i386 instead of AMD64 machine reports [1] that commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a regression. BUG_ON(PageHighMem(pg)) in

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > A user with i386 instead of AMD64 machine reports [1] that commit > 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a > regression. > BUG_ON(PageHighMem(pg)) in drivers/media/common/saa7146/saa7146_core.c always

Re: Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-08 Thread Matthew Wilcox
On Thu, Feb 08, 2018 at 02:29:57PM +0800, Kai Heng Feng wrote: > A user with i386 instead of AMD64 machine reports [1] that commit > 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a > regression. > BUG_ON(PageHighMem(pg)) in drivers/media/common/saa7146/saa7146_core.c always

Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-07 Thread Kai Heng Feng
A user with i386 instead of AMD64 machine reports [1] that commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a regression. BUG_ON(PageHighMem(pg)) in drivers/media/common/saa7146/saa7146_core.c always gets triggered after that commit. Commit 704b862f9efd ("mm/vmalloc.c:

Regression after commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly")

2018-02-07 Thread Kai Heng Feng
A user with i386 instead of AMD64 machine reports [1] that commit 19809c2da28a ("mm, vmalloc: use __GFP_HIGHMEM implicitly”) causes a regression. BUG_ON(PageHighMem(pg)) in drivers/media/common/saa7146/saa7146_core.c always gets triggered after that commit. Commit 704b862f9efd ("mm/vmalloc.c: