lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZaF1oQyovAOMA3be@tiehlicka>
Date: Fri, 12 Jan 2024 18:23:45 +0100
From: Michal Hocko <mhocko@...e.com>
To: Roman Gushchin <roman.gushchin@...ux.dev>
Cc: Johannes Weiner <hannes@...xchg.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Shakeel Butt <shakeelb@...gle.com>,
	Muchun Song <muchun.song@...ux.dev>, Tejun Heo <tj@...nel.org>,
	Dan Schatzberg <schatzberg.dan@...il.com>, cgroups@...r.kernel.org,
	linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: memcontrol: don't throttle dying tasks on memory.high

On Fri 12-01-24 09:10:33, Roman Gushchin wrote:
> On Fri, Jan 12, 2024 at 06:06:39PM +0100, Michal Hocko wrote:
> > On Thu 11-01-24 14:28:07, Johannes Weiner wrote:
> > [...]
> > > @@ -2867,11 +2882,17 @@ static int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask,
> > >  		}
> > >  	} while ((memcg = parent_mem_cgroup(memcg)));
> > >  
> > > +	/*
> > > +	 * Reclaim is set up above to be called from the userland
> > > +	 * return path. But also attempt synchronous reclaim to avoid
> > > +	 * excessive overrun while the task is still inside the
> > > +	 * kernel. If this is successful, the return path will see it
> > > +	 * when it rechecks the overage and simply bail out.
> > > +	 */
> > >  	if (current->memcg_nr_pages_over_high > MEMCG_CHARGE_BATCH &&
> > >  	    !(current->flags & PF_MEMALLOC) &&
> > > -	    gfpflags_allow_blocking(gfp_mask)) {
> > > +	    gfpflags_allow_blocking(gfp_mask))
> > >  		mem_cgroup_handle_over_high(gfp_mask);
> > 
> > Have you lost the check for the dying task here?
> 
> It was moved into mem_cgroup_handle_over_high()'s body.

Ohh, right. Somehow overlooked that even when I was staring at that
path.

Acked-by: Michal Hocko <mhocko@...e.com>

Thanks!

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ