Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-10-23 Thread Daniel Vetter
On Thu, Jun 25, 2020 at 12:31:22PM +0100, Matthew Wilcox (Oracle) wrote: > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > guarantees we will not sleep to reclaim memory. Use it to simplify > dm-bufio's allocations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > drivers/

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-09-23 Thread Matthew Wilcox
On Wed, Sep 23, 2020 at 08:39:02PM -0400, Mike Snitzer wrote: > On Thu, Jun 25 2020 at 7:31am -0400, > Matthew Wilcox (Oracle) wrote: > > > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > > guarantees we will not sleep to reclaim memory. Use it to simplify > > dm-bufio's all

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-09-23 Thread Mike Snitzer
On Thu, Jun 25 2020 at 7:31am -0400, Matthew Wilcox (Oracle) wrote: > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > guarantees we will not sleep to reclaim memory. Use it to simplify > dm-bufio's allocations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > drivers/md

Re: [wi...@infradead.org: Re: [PATCH 6/6] mm: Add memalloc_nowait]

2020-07-01 Thread Jonathan Corbet
On Wed, 1 Jul 2020 05:13:16 +0100 Matthew Wilcox wrote: > > > -It turned out though that above approach has led to > > > -abuses when the restricted gfp mask is used "just in case" without a > > > -deeper consideration which leads to problems because an excessive use > > > -of GFP_NOFS/GFP_NOIO c

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-07-01 Thread Mike Rapoport
On Wed, Jul 01, 2020 at 07:53:46AM +0200, Michal Hocko wrote: > On Wed 01-07-20 05:12:03, Matthew Wilcox wrote: > > On Tue, Jun 30, 2020 at 08:34:36AM +0200, Michal Hocko wrote: > > > On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: > > > [...] > > > > The documentation is hard to add a new case to,

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-30 Thread Michal Hocko
On Wed 01-07-20 05:12:03, Matthew Wilcox wrote: > On Tue, Jun 30, 2020 at 08:34:36AM +0200, Michal Hocko wrote: > > On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: > > [...] > > > The documentation is hard to add a new case to, so I rewrote it. What > > > do you think? (Obviously I'll split this

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-30 Thread Matthew Wilcox
On Tue, Jun 30, 2020 at 08:34:36AM +0200, Michal Hocko wrote: > On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: > [...] > > The documentation is hard to add a new case to, so I rewrote it. What > > do you think? (Obviously I'll split this out differently for submission; > > this is just what I ha

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Michal Hocko
On Mon 29-06-20 22:28:30, Matthew Wilcox wrote: [...] > The documentation is hard to add a new case to, so I rewrote it. What > do you think? (Obviously I'll split this out differently for submission; > this is just what I have in my tree right now). I am fine with your changes. Few notes below.

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Mike Rapoport
On June 29, 2020 3:52:31 PM GMT+03:00, Michal Hocko wrote: >On Mon 29-06-20 13:18:16, Matthew Wilcox wrote: >> On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: >> > > @@ -886,8 +868,12 @@ static struct dm_buffer >*__alloc_buffer_wait_no_callback(struct dm_bufio_client >> > >

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Mike Rapoport
On Thu, Jun 25, 2020 at 12:31:22PM +0100, Matthew Wilcox (Oracle) wrote: > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > guarantees we will not sleep to reclaim memory. Use it to simplify > dm-bufio's allocations. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > drivers/

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Matthew Wilcox
On Mon, Jun 29, 2020 at 04:45:14PM +0300, Mike Rapoport wrote: > > > On June 29, 2020 3:52:31 PM GMT+03:00, Michal Hocko wrote: > >On Mon 29-06-20 13:18:16, Matthew Wilcox wrote: > >> On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: > >> > > @@ -886,8 +868,12 @@ static struct dm_bu

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Michal Hocko
On Mon 29-06-20 13:18:16, Matthew Wilcox wrote: > On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: > > > @@ -886,8 +868,12 @@ static struct dm_buffer > > > *__alloc_buffer_wait_no_callback(struct dm_bufio_client > > > return NULL; > > > > > > if (dm_bufi

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-29 Thread Matthew Wilcox
On Mon, Jun 29, 2020 at 08:08:51AM +0300, Mike Rapoport wrote: > > @@ -886,8 +868,12 @@ static struct dm_buffer > > *__alloc_buffer_wait_no_callback(struct dm_bufio_client > > return NULL; > > > > if (dm_bufio_cache_size_latch != 1 && !tried_noio_alloc) { > > +

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread kernel test robot
Hi "Matthew, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/sched/core] [also build test ERROR on dm/for-next linus/master v5.8-rc2] [cannot apply to xfs-linux/for-next next-20200625] [If your patch is applied to the wrong git tree, kindly drop us a note. And whe

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread kernel test robot
Hi "Matthew, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/sched/core] [also build test ERROR on dm/for-next linus/master v5.8-rc2] [cannot apply to xfs-linux/for-next next-20200625] [If your patch is applied to the wrong git tree, kindly drop us a note. And whe

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread Michal Hocko
On Thu 25-06-20 14:10:55, Matthew Wilcox wrote: > On Thu, Jun 25, 2020 at 02:40:17PM +0200, Michal Hocko wrote: > > On Thu 25-06-20 12:31:22, Matthew Wilcox wrote: > > > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > > > guarantees we will not sleep to reclaim memory. Use it t

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread Matthew Wilcox
On Thu, Jun 25, 2020 at 02:40:17PM +0200, Michal Hocko wrote: > On Thu 25-06-20 12:31:22, Matthew Wilcox wrote: > > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > > guarantees we will not sleep to reclaim memory. Use it to simplify > > dm-bufio's allocations. > > memalloc_now

Re: [PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread Michal Hocko
On Thu 25-06-20 12:31:22, Matthew Wilcox wrote: > Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() > guarantees we will not sleep to reclaim memory. Use it to simplify > dm-bufio's allocations. memalloc_nowait is a good idea! I suspect the primary usecase would be vmalloc. > Sig

[PATCH 6/6] mm: Add memalloc_nowait

2020-06-25 Thread Matthew Wilcox (Oracle)
Similar to memalloc_noio() and memalloc_nofs(), memalloc_nowait() guarantees we will not sleep to reclaim memory. Use it to simplify dm-bufio's allocations. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/md/dm-bufio.c| 30 -- include/linux/sched.h| 1 +