Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-26 Thread Michal Hocko
On Thu 22-08-19 16:26:42, Vlastimil Babka wrote: > On 8/22/19 3:17 PM, Dave Chinner wrote: > > On Thu, Aug 22, 2019 at 02:19:04PM +0200, Vlastimil Babka wrote: > >> On 8/22/19 2:07 PM, Dave Chinner wrote: > >> > On Thu, Aug 22, 2019 at 01:14:30PM +0200, Vlastimil Babka wrote: > >> > > >> > No,

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Vlastimil Babka
On 8/22/19 3:17 PM, Dave Chinner wrote: > On Thu, Aug 22, 2019 at 02:19:04PM +0200, Vlastimil Babka wrote: >> On 8/22/19 2:07 PM, Dave Chinner wrote: >> > On Thu, Aug 22, 2019 at 01:14:30PM +0200, Vlastimil Babka wrote: >> > >> > No, the problem is this (using kmalloc as a general term for >> >

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Dave Chinner
On Thu, Aug 22, 2019 at 02:19:04PM +0200, Vlastimil Babka wrote: > On 8/22/19 2:07 PM, Dave Chinner wrote: > > On Thu, Aug 22, 2019 at 01:14:30PM +0200, Vlastimil Babka wrote: > > > > No, the problem is this (using kmalloc as a general term for > > allocation, whether it be kmalloc,

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Vlastimil Babka
On 8/22/19 2:07 PM, Dave Chinner wrote: > On Thu, Aug 22, 2019 at 01:14:30PM +0200, Vlastimil Babka wrote: > > No, the problem is this (using kmalloc as a general term for > allocation, whether it be kmalloc, kmem_cache_alloc, alloc_page, etc) > >some random kernel code >

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Dave Chinner
On Thu, Aug 22, 2019 at 01:14:30PM +0200, Vlastimil Babka wrote: > On 8/22/19 12:14 PM, Dave Chinner wrote: > > On Thu, Aug 22, 2019 at 11:10:57AM +0200, Peter Zijlstra wrote: > >> > >> Ah, current_gfp_context() already seems to transfer PF_MEMALLOC_NOFS > >> into the GFP flags. > >> > >> So are

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Vlastimil Babka
On 8/22/19 12:14 PM, Dave Chinner wrote: > On Thu, Aug 22, 2019 at 11:10:57AM +0200, Peter Zijlstra wrote: >> >> Ah, current_gfp_context() already seems to transfer PF_MEMALLOC_NOFS >> into the GFP flags. >> >> So are we sure it is broken and needs mending? > > Well, that's what we are trying

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Dave Chinner
On Thu, Aug 22, 2019 at 11:10:57AM +0200, Peter Zijlstra wrote: > On Thu, Aug 22, 2019 at 10:51:30AM +0200, Peter Zijlstra wrote: > > On Thu, Aug 22, 2019 at 12:59:48AM -0700, Christoph Hellwig wrote: > > > On Thu, Aug 22, 2019 at 10:31:32AM +1000, Dave Chinner wrote: > > > > > Btw, I think we

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Peter Zijlstra
On Thu, Aug 22, 2019 at 10:51:30AM +0200, Peter Zijlstra wrote: > On Thu, Aug 22, 2019 at 12:59:48AM -0700, Christoph Hellwig wrote: > > On Thu, Aug 22, 2019 at 10:31:32AM +1000, Dave Chinner wrote: > > > > Btw, I think we should eventually kill off KM_NOFS and just use > > > > PF_MEMALLOC_NOFS in

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Peter Zijlstra
On Thu, Aug 22, 2019 at 12:59:48AM -0700, Christoph Hellwig wrote: > On Thu, Aug 22, 2019 at 10:31:32AM +1000, Dave Chinner wrote: > > > Btw, I think we should eventually kill off KM_NOFS and just use > > > PF_MEMALLOC_NOFS in XFS, as the interface makes so much more sense. > > > But that's

Re: [PATCH 2/3] xfs: add kmem_alloc_io()

2019-08-22 Thread Christoph Hellwig
On Thu, Aug 22, 2019 at 10:31:32AM +1000, Dave Chinner wrote: > > Btw, I think we should eventually kill off KM_NOFS and just use > > PF_MEMALLOC_NOFS in XFS, as the interface makes so much more sense. > > But that's something for the future. > > Yeah, and it's not quite as simple as just using