Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-25 Thread Michal Hocko
On Tue 23-05-17 12:44:18, Mikulas Patocka wrote: > > > On Tue, 23 May 2017, Michal Hocko wrote: > > > On Mon 22-05-17 13:35:41, David Rientjes wrote: > > > On Mon, 22 May 2017, Mike Snitzer wrote: > > [...] > > > > While adding the __GFP_NOFAIL flag would serve to document expectations > > > >

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-25 Thread Michal Hocko
On Tue 23-05-17 12:44:18, Mikulas Patocka wrote: > > > On Tue, 23 May 2017, Michal Hocko wrote: > > > On Mon 22-05-17 13:35:41, David Rientjes wrote: > > > On Mon, 22 May 2017, Mike Snitzer wrote: > > [...] > > > > While adding the __GFP_NOFAIL flag would serve to document expectations > > > >

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Mikulas Patocka
On Tue, 23 May 2017, Michal Hocko wrote: > On Mon 22-05-17 13:35:41, David Rientjes wrote: > > On Mon, 22 May 2017, Mike Snitzer wrote: > [...] > > > While adding the __GFP_NOFAIL flag would serve to document expectations > > > I'm left unconvinced that the memory allocator will _not fail_ for

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Mikulas Patocka
On Tue, 23 May 2017, Michal Hocko wrote: > On Mon 22-05-17 13:35:41, David Rientjes wrote: > > On Mon, 22 May 2017, Mike Snitzer wrote: > [...] > > > While adding the __GFP_NOFAIL flag would serve to document expectations > > > I'm left unconvinced that the memory allocator will _not fail_ for

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Michal Hocko
On Mon 22-05-17 14:04:15, Mike Snitzer wrote: > On Mon, May 22 2017 at 11:03am -0400, > Michal Hocko wrote: > > > On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > > > > > > > On Mon, 22 May 2017, Michal Hocko wrote: > > [...] > > > > I am not sure I understand. OOM

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Michal Hocko
On Mon 22-05-17 14:04:15, Mike Snitzer wrote: > On Mon, May 22 2017 at 11:03am -0400, > Michal Hocko wrote: > > > On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > > > > > > > On Mon, 22 May 2017, Michal Hocko wrote: > > [...] > > > > I am not sure I understand. OOM killer is invoked for

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Michal Hocko
On Mon 22-05-17 13:35:41, David Rientjes wrote: > On Mon, 22 May 2017, Mike Snitzer wrote: [...] > > While adding the __GFP_NOFAIL flag would serve to document expectations > > I'm left unconvinced that the memory allocator will _not fail_ for an > > order-0 page -- as Mikulas said most ioctls

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-23 Thread Michal Hocko
On Mon 22-05-17 13:35:41, David Rientjes wrote: > On Mon, 22 May 2017, Mike Snitzer wrote: [...] > > While adding the __GFP_NOFAIL flag would serve to document expectations > > I'm left unconvinced that the memory allocator will _not fail_ for an > > order-0 page -- as Mikulas said most ioctls

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mike Snitzer
On Mon, May 22 2017 at 4:35pm -0400, David Rientjes wrote: > On Mon, 22 May 2017, Mike Snitzer wrote: > > > > > The lvm2 was designed this way - it is broken, but there is not much > > > > that > > > > can be done about it - fixing this would mean major rewrite. The only

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mike Snitzer
On Mon, May 22 2017 at 4:35pm -0400, David Rientjes wrote: > On Mon, 22 May 2017, Mike Snitzer wrote: > > > > > The lvm2 was designed this way - it is broken, but there is not much > > > > that > > > > can be done about it - fixing this would mean major rewrite. The only > > > > thing we

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread David Rientjes
On Mon, 22 May 2017, Mike Snitzer wrote: > > > The lvm2 was designed this way - it is broken, but there is not much that > > > can be done about it - fixing this would mean major rewrite. The only > > > thing we can do about it is to lower the deadlock probability with > > > __GFP_HIGH (or

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread David Rientjes
On Mon, 22 May 2017, Mike Snitzer wrote: > > > The lvm2 was designed this way - it is broken, but there is not much that > > > can be done about it - fixing this would mean major rewrite. The only > > > thing we can do about it is to lower the deadlock probability with > > > __GFP_HIGH (or

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mike Snitzer
On Mon, May 22 2017 at 11:03am -0400, Michal Hocko wrote: > On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > > > > On Mon, 22 May 2017, Michal Hocko wrote: > [...] > > > I am not sure I understand. OOM killer is invoked for _all_ allocations > > > <=

Re: dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mike Snitzer
On Mon, May 22 2017 at 11:03am -0400, Michal Hocko wrote: > On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > > > > On Mon, 22 May 2017, Michal Hocko wrote: > [...] > > > I am not sure I understand. OOM killer is invoked for _all_ allocations > > > <= PAGE_ALLOC_COSTLY_ORDER that do not

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > On Mon, 22 May 2017, Michal Hocko wrote: [...] > > I am not sure I understand. OOM killer is invoked for _all_ allocations > > <= PAGE_ALLOC_COSTLY_ORDER that do not have __GFP_NORETRY as long as the > > OOM killer is not disabled

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Mon 22-05-17 10:52:44, Mikulas Patocka wrote: > > > On Mon, 22 May 2017, Michal Hocko wrote: [...] > > I am not sure I understand. OOM killer is invoked for _all_ allocations > > <= PAGE_ALLOC_COSTLY_ORDER that do not have __GFP_NORETRY as long as the > > OOM killer is not disabled

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mikulas Patocka
On Mon, 22 May 2017, Michal Hocko wrote: > On Mon 22-05-17 08:00:11, Mikulas Patocka wrote: > > > > On Mon, 22 May 2017, Michal Hocko wrote: > > > > > > Sometimes, I/O to a device mapper device is blocked until the userspace > > > > daemon dmeventd does some action (for example, when

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mikulas Patocka
On Mon, 22 May 2017, Michal Hocko wrote: > On Mon 22-05-17 08:00:11, Mikulas Patocka wrote: > > > > On Mon, 22 May 2017, Michal Hocko wrote: > > > > > > Sometimes, I/O to a device mapper device is blocked until the userspace > > > > daemon dmeventd does some action (for example, when

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Mon 22-05-17 08:00:11, Mikulas Patocka wrote: > > > On Mon, 22 May 2017, Michal Hocko wrote: > > > On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > > > > > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > > > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > > > (Adding

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Mon 22-05-17 08:00:11, Mikulas Patocka wrote: > > > On Mon, 22 May 2017, Michal Hocko wrote: > > > On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > > > > > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > > > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > > > (Adding

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mikulas Patocka
On Mon, 22 May 2017, Michal Hocko wrote: > On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > > (Adding back the correct linux-mm email address and also adding > > > >

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Mikulas Patocka
On Mon, 22 May 2017, Michal Hocko wrote: > On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > > (Adding back the correct linux-mm email address and also adding > > > >

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > (Adding back the correct linux-mm email address and also adding > > > linux-kernel.) > > > > > > On Thursday, May 18, 2017 01:41:33 PM

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-22 Thread Michal Hocko
On Fri 19-05-17 19:43:23, Mikulas Patocka wrote: > > > On Fri, 19 May 2017, Michal Hocko wrote: > > > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > > (Adding back the correct linux-mm email address and also adding > > > linux-kernel.) > > > > > > On Thursday, May 18, 2017 01:41:33 PM

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-20 Thread Mikulas Patocka
On Sat, 20 May 2017, Michal Hocko wrote: > On Fri 19-05-17 19:50:24, Mikulas Patocka wrote: > > > > > > On Thu, 18 May 2017, Junaid Shahid wrote: > > > > > d224e9381897 (drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded > > > variant) left out the __GFP_HIGH flag when converting from

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-20 Thread Mikulas Patocka
On Sat, 20 May 2017, Michal Hocko wrote: > On Fri 19-05-17 19:50:24, Mikulas Patocka wrote: > > > > > > On Thu, 18 May 2017, Junaid Shahid wrote: > > > > > d224e9381897 (drivers/md/dm-ioctl.c: use kvmalloc rather than opencoded > > > variant) left out the __GFP_HIGH flag when converting from

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-19 Thread Mikulas Patocka
On Fri, 19 May 2017, Michal Hocko wrote: > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > (Adding back the correct linux-mm email address and also adding > > linux-kernel.) > > > > On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: > [...] > > > Let's ask Mikulas, who changed

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-19 Thread Mikulas Patocka
On Fri, 19 May 2017, Michal Hocko wrote: > On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > > (Adding back the correct linux-mm email address and also adding > > linux-kernel.) > > > > On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: > [...] > > > Let's ask Mikulas, who changed

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-19 Thread Michal Hocko
On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > (Adding back the correct linux-mm email address and also adding linux-kernel.) > > On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: [...] > > Let's ask Mikulas, who changed this from PF_MEMALLOC to __GFP_HIGH, > > assuming there was a

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-19 Thread Michal Hocko
On Thu 18-05-17 19:50:46, Junaid Shahid wrote: > (Adding back the correct linux-mm email address and also adding linux-kernel.) > > On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: [...] > > Let's ask Mikulas, who changed this from PF_MEMALLOC to __GFP_HIGH, > > assuming there was a

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-18 Thread Junaid Shahid
(Adding back the correct linux-mm email address and also adding linux-kernel.) On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: > On Thu, 18 May 2017, Michal Hocko wrote: > > > On Thu 18-05-17 11:50:40, Junaid Shahid wrote: > > > d224e9381897 (drivers/md/dm-ioctl.c: use kvmalloc

Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params()

2017-05-18 Thread Junaid Shahid
(Adding back the correct linux-mm email address and also adding linux-kernel.) On Thursday, May 18, 2017 01:41:33 PM David Rientjes wrote: > On Thu, 18 May 2017, Michal Hocko wrote: > > > On Thu 18-05-17 11:50:40, Junaid Shahid wrote: > > > d224e9381897 (drivers/md/dm-ioctl.c: use kvmalloc