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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 3 Nov 2017 15:17:03 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, aarcange@...hat.com,
        hannes@...xchg.org
Subject: Re: [PATCH] mm,page_alloc: Update comment for last second allocation
 attempt.

On Fri 03-11-17 23:08:35, Tetsuo Handa wrote:
> Michal Hocko wrote:
> > On Fri 03-11-17 22:46:29, Tetsuo Handa wrote:
> > [...]
> > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> > > index c274960..547e9cb 100644
> > > --- a/mm/page_alloc.c
> > > +++ b/mm/page_alloc.c
> > > @@ -3312,11 +3312,10 @@ void warn_alloc(gfp_t gfp_mask, nodemask_t *nodemask, const char *fmt, ...)
> > >  	}
> > >  
> > >  	/*
> > > -	 * Go through the zonelist yet one more time, keep very high watermark
> > > -	 * here, this is only to catch a parallel oom killing, we must fail if
> > > -	 * we're still under heavy pressure. But make sure that this reclaim
> > > -	 * attempt shall not depend on __GFP_DIRECT_RECLAIM && !__GFP_NORETRY
> > > -	 * allocation which will never fail due to oom_lock already held.
> > > +	 * This allocation attempt must not depend on __GFP_DIRECT_RECLAIM &&
> > > +	 * !__GFP_NORETRY allocation which will never fail due to oom_lock
> > > +	 * already held. And since this allocation attempt does not sleep,
> > > +	 * there is no reason we must use high watermark here.
> > >  	 */
> > >  	page = get_page_from_freelist((gfp_mask | __GFP_HARDWALL) &
> > >  				      ~__GFP_DIRECT_RECLAIM, order,
> > 
> > Which patch does this depend on?
> 
> This patch is preparation for "mm,oom: Move last second allocation to inside
> the OOM killer." patch in order to use changelog close to what you suggested.
> That is, I will move this comment and get_page_from_freelist() together to
> alloc_pages_before_oomkill(), after we recorded why using ALLOC_WMARK_HIGH.

Is it really worth a separate patch, though? Aren't you overcomplicating
things again?
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ