Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-12 Thread Roman Gushchin
On Wed, Sep 12, 2018 at 02:35:34PM +0200, Michal Hocko wrote: > On Tue 11-09-18 08:27:30, Roman Gushchin wrote: > > On Tue, Sep 11, 2018 at 02:11:41PM +0200, Michal Hocko wrote: > > > On Mon 10-09-18 14:56:22, Roman Gushchin wrote: > > > > The memcg OOM killer is never invoked due to a failed

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-12 Thread Michal Hocko
On Tue 11-09-18 08:27:30, Roman Gushchin wrote: > On Tue, Sep 11, 2018 at 02:11:41PM +0200, Michal Hocko wrote: > > On Mon 10-09-18 14:56:22, Roman Gushchin wrote: > > > The memcg OOM killer is never invoked due to a failed high-order > > > allocation, however the MEMCG_OOM event can be easily

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Roman Gushchin
On Tue, Sep 11, 2018 at 08:43:03AM -0400, Johannes Weiner wrote: > On Mon, Sep 10, 2018 at 02:56:22PM -0700, Roman Gushchin wrote: > > The memcg OOM killer is never invoked due to a failed high-order > > allocation, however the MEMCG_OOM event can be easily raised. > > Wasn't the same also true

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Roman Gushchin
On Tue, Sep 11, 2018 at 02:41:04PM +0200, peter enderborg wrote: > On 09/11/2018 02:11 PM, Michal Hocko wrote: > > Why is this a problem though? IIRC this event was deliberately placed > > outside of the oom path because we wanted to count allocation failures > > and this is also documented that

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Roman Gushchin
On Tue, Sep 11, 2018 at 02:11:41PM +0200, Michal Hocko wrote: > On Mon 10-09-18 14:56:22, Roman Gushchin wrote: > > The memcg OOM killer is never invoked due to a failed high-order > > allocation, however the MEMCG_OOM event can be easily raised. > > > > Under some memory pressure it can happen

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Michal Hocko
On Tue 11-09-18 14:41:04, peter enderborg wrote: > On 09/11/2018 02:11 PM, Michal Hocko wrote: > > Why is this a problem though? IIRC this event was deliberately placed > > outside of the oom path because we wanted to count allocation failures > > and this is also documented that way > > > >

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Johannes Weiner
On Mon, Sep 10, 2018 at 02:56:22PM -0700, Roman Gushchin wrote: > The memcg OOM killer is never invoked due to a failed high-order > allocation, however the MEMCG_OOM event can be easily raised. Wasn't the same also true for kernel allocations until recently? We'd signal MEMCG_OOM and then return

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread peter enderborg
On 09/11/2018 02:11 PM, Michal Hocko wrote: > Why is this a problem though? IIRC this event was deliberately placed > outside of the oom path because we wanted to count allocation failures > and this is also documented that way > > oom > The number of time the cgroup's

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-11 Thread Michal Hocko
On Mon 10-09-18 14:56:22, Roman Gushchin wrote: > The memcg OOM killer is never invoked due to a failed high-order > allocation, however the MEMCG_OOM event can be easily raised. > > Under some memory pressure it can happen easily because of a > concurrent allocation. Let's look at try_charge().

Re: [PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-10 Thread David Rientjes
On Mon, 10 Sep 2018, Roman Gushchin wrote: > The memcg OOM killer is never invoked due to a failed high-order > allocation, however the MEMCG_OOM event can be easily raised. > > Under some memory pressure it can happen easily because of a > concurrent allocation. Let's look at try_charge(). Even

[PATCH RFC] mm: don't raise MEMCG_OOM event due to failed high-order allocation

2018-09-10 Thread Roman Gushchin
The memcg OOM killer is never invoked due to a failed high-order allocation, however the MEMCG_OOM event can be easily raised. Under some memory pressure it can happen easily because of a concurrent allocation. Let's look at try_charge(). Even if we were able to reclaim enough memory, this check