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: <alpine.DEB.2.21.2003091745340.156701@chino.kir.corp.google.com>
Date:   Mon, 9 Mar 2020 17:45:53 -0700 (PDT)
From:   David Rientjes <rientjes@...gle.com>
To:     David Hildenbrand <david@...hat.com>
cc:     "Huang, Ying" <ying.huang@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Mel Gorman <mgorman@...e.de>, Vlastimil Babka <vbabka@...e.cz>,
        Zi Yan <ziy@...dia.com>, Michal Hocko <mhocko@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Minchan Kim <minchan@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Hugh Dickins <hughd@...gle.com>
Subject: Re: [PATCH -V3] mm: Add PageLayzyFree() helper functions for
 MADV_FREE

On Mon, 9 Mar 2020, David Hildenbrand wrote:

> >> I still prefer something like
> >>
> >> diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
> >> index fd6d4670ccc3..7538501230bd 100644
> >> --- a/include/linux/page-flags.h
> >> +++ b/include/linux/page-flags.h
> >> @@ -63,6 +63,10 @@
> >>   * page_waitqueue(page) is a wait queue of all tasks waiting for the page
> >>   * to become unlocked.
> >>   *
> >> + * PG_swapbacked used with anonymous pages (PageAnon()) indicates that a
> >> + * page is backed by swap. Anonymous pages without PG_swapbacked are
> >> + * pages that can be lazily freed (e.g., MADV_FREE) on demand.
> >> + *
> >>   * PG_uptodate tells whether the page's contents is valid.  When a read
> >>   * completes, the page becomes uptodate, unless a disk I/O error happened.
> >>   *
> > 
> > Why not just send a formal patch?  So Andrew can just pick anything he
> > likes.  I am totally OK with that.
> 
> Because you're working on cleaning this up.
> 
> > 
> >> and really don't like the use of !__PageLazyFree() instead of PageSwapBacked().
> > 
> > If adopted, !__PageLazyFree() should only be used in the context where
> > we really want to check whether pages are freed lazily.  Otherwise,
> > PageSwapBacked() should be used.
> > 
> 
> Yeah, and once again, personally, I don't like this approach. E.g.,
> ClearPageLazyFree() sets PG_swapbacked. You already have to be aware
> that this is a single flag being used in the background and what the
> implications are. IMHO, in no way better than the current approach. I
> prefer better documentation instead.
> 

Fully agreed.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ