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: <7ae64b5e-79ee-5768-34a3-75e33ea45246@infradead.org>
Date:   Tue, 17 Apr 2018 14:12:05 -0700
From:   Randy Dunlap <rdunlap@...radead.org>
To:     "Huang, Ying" <ying.huang@...el.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Tim Chen <tim.c.chen@...el.com>, Andi Kleen <ak@...ux.intel.com>,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Michal Hocko <mhocko@...e.com>,
        Johannes Weiner <hannes@...xchg.org>,
        Shaohua Li <shli@...nel.org>, Hugh Dickins <hughd@...gle.com>,
        Minchan Kim <minchan@...nel.org>,
        Rik van Riel <riel@...hat.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
        Zi Yan <zi.yan@...rutgers.edu>
Subject: Re: [PATCH -mm 06/21] mm, THP, swap: Support PMD swap mapping when
 splitting huge PMD

On 04/16/18 19:02, Huang, Ying wrote:
> From: Huang Ying <ying.huang@...el.com>
> 
> A huge PMD need to be split when zap a part of the PMD mapping etc.
> If the PMD mapping is a swap mapping, we need to split it too.  This
> patch implemented the support for this.  This is similar as splitting
> the PMD page mapping, except we need to decrease the PMD swap mapping
> count for the huge swap cluster too.  If the PMD swap mapping count
> becomes 0, the huge swap cluster will be split.
> 
> Notice: is_huge_zero_pmd() and pmd_page() doesn't work well with swap
> PMD, so pmd_present() check is called before them.

FWIW, I would prefer to see that comment in the source code, not just
in the commit description.

> 
> Signed-off-by: "Huang, Ying" <ying.huang@...el.com>
> Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> Cc: Andrea Arcangeli <aarcange@...hat.com>
> Cc: Michal Hocko <mhocko@...e.com>
> Cc: Johannes Weiner <hannes@...xchg.org>
> Cc: Shaohua Li <shli@...nel.org>
> Cc: Hugh Dickins <hughd@...gle.com>
> Cc: Minchan Kim <minchan@...nel.org>
> Cc: Rik van Riel <riel@...hat.com>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Naoya Horiguchi <n-horiguchi@...jp.nec.com>
> Cc: Zi Yan <zi.yan@...rutgers.edu>
> ---
>  include/linux/swap.h |  6 +++++
>  mm/huge_memory.c     | 54 ++++++++++++++++++++++++++++++++++++++++----
>  mm/swapfile.c        | 28 +++++++++++++++++++++++
>  3 files changed, 83 insertions(+), 5 deletions(-)


-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ