Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1647029
| From | Michal Hocko <mhocko@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() |
| Date | 2017-05-22 17:10 +0200 |
| Message-ID | <tJX87-7gH-29@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <tIZOG-16K-9@gated-at.bofh.it> <tJRYJ-3Yq-11@gated-at.bofh.it> <tJUjU-5vZ-21@gated-at.bofh.it> <tJUtA-5zo-25@gated-at.bofh.it> <tJWYp-6XB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 (oom_killer_disable) and that only happens > > from the PM suspend path which makes sure that no userspace is active at > > the time. AFAIU this is a userspace triggered path and so the later > > shouldn't apply to it and GFP_KERNEL should be therefore sufficient. > > Relying to a portion of memory reserves to prevent from deadlock seems > > fundamentaly broken to me. > > > > 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 PF_MEMALLOC that was used some times ago). But let me repeat. GFP_KERNEL allocation for order-0 page will not fail. If you need non-failing semantic then just make it clear by adding __GFP_NOFAIL rather than __GFP_HIGH. Memory reserves are a scarce resource and there are users which might really need it from atomic contexts. Anyway, this is not the code I am maintaining so I will not argue more and won't nack the patch. But is smells like a pure cargo cult, to be honest. If you really insist, though, I would just ask to have a more detailed explanation why it is _believed_ the flag is needed because the vague "Use __GFP_HIGH to avoid low memory issues when a device is suspended and the ioctl is needed to resume it." doesn't really clarify much to be honest. Thanks! -- Michal Hocko SUSE Labs
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Junaid Shahid <junaids@google.com> - 2017-05-19 05:00 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-19 09:50 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Mikulas Patocka <mpatocka@redhat.com> - 2017-05-20 01:50 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-22 11:40 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Mikulas Patocka <mpatocka@redhat.com> - 2017-05-22 14:10 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-22 14:20 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Mikulas Patocka <mpatocka@redhat.com> - 2017-05-22 17:00 +0200
Re: [PATCH] dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-22 17:10 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() Mike Snitzer <snitzer@redhat.com> - 2017-05-22 20:10 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() David Rientjes <rientjes@google.com> - 2017-05-22 22:40 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() Mike Snitzer <snitzer@redhat.com> - 2017-05-23 01:40 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-23 08:10 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() Mikulas Patocka <mpatocka@redhat.com> - 2017-05-23 18:50 +0200
Re: dm ioctl: Restore __GFP_HIGH in copy_params() Michal Hocko <mhocko@kernel.org> - 2017-05-23 09:00 +0200
csiph-web