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]
Date:   Fri, 4 Oct 2019 14:18:24 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Vlastimil Babka <vbabka@...e.cz>
Cc:     David Rientjes <rientjes@...gle.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Mel Gorman <mgorman@...e.de>,
        "Kirill A. Shutemov" <kirill@...temov.name>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-MM <linux-mm@...ck.org>
Subject: Re: [patch for-5.3 0/4] revert immediate fallback to remote hugepages

On Thu 03-10-19 10:00:08, Vlastimil Babka wrote:
> On 10/3/19 12:32 AM, David Rientjes wrote:
> > On Wed, 2 Oct 2019, Michal Hocko wrote:
> > 
> >>>> If 
> >>>> hugetlb wants to stress this to the fullest extent possible, it already 
> >>>> appropriately uses __GFP_RETRY_MAYFAIL.
> >>>
> >>> Which doesn't work anymore right now, and should again after this patch.
> >>
> >> I didn't get to fully digest the patch Vlastimil is proposing. (Ab)using
> >> __GFP_NORETRY is quite subtle but it is already in place with some
> >> explanation and a reference to THPs. So while I am not really happy it
> >> is at least something you can reason about.
> >>
> > 
> > It's a no-op:
> > 
> >         /* Do not loop if specifically requested */
> >         if (gfp_mask & __GFP_NORETRY)
> >                 goto nopage;
> > 
> >         /*
> >          * Do not retry costly high order allocations unless they are
> >          * __GFP_RETRY_MAYFAIL
> >          */
> >         if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL))
> >                 goto nopage;
> > 
> > So I'm not sure we should spend too much time discussing a hunk of a patch 
> > that doesn't do anything.
> 
> I believe Michal was talking about my (ab)use of __GFP_NORETRY, where it
> controls the earlier 'goto nopage' condition.

That is correct. From a maintainability point of view it would be better
to have only a single bailout of an optimistic compaction attempt. If we
go with [1] then we have two different criterion to bail out and
that is really messy and error prone. While sticking __GFP_RETRY_MAYFAIL
as suggest in [1] fixes up the immediate regression in the simplest way
this all really begs for a proper analysis and a _real_ fix. Can we move
that direction finally, please?

I would really love to conduct further testing but I haven't really
heard anything to results presented so far. I have no idea whether
that is even remotely resembling anything David needs for his claimed
regression.

[1] http://lkml.kernel.org/r/alpine.DEB.2.21.1910021556270.187014@chino.kir.corp.google.com

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ