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: <592329FA-69D0-4801-A5DF-F9CC8A3FE305@nvidia.com>
Date:   Mon, 6 Apr 2020 09:11:27 -0400
From:   Zi Yan <ziy@...dia.com>
To:     "Kirill A. Shutemov" <kirill@...temov.name>
CC:     <akpm@...ux-foundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        "Yang Shi" <yang.shi@...ux.alibaba.com>, <linux-mm@...ck.org>,
        <linux-kernel@...r.kernel.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCHv2 4/8] khugepaged: Drain LRU add pagevec after swapin

On 3 Apr 2020, at 7:29, Kirill A. Shutemov wrote:

> External email: Use caution opening links or attachments
>
>
> __collapse_huge_page_isolate() may fail due to extra pin in the LRU add
> pagevec. It's petty common for swapin case: we swap in pages just to

s/petty/pretty

> fail due to the extra pin.
>
> Drain LRU add pagevec on sucessfull swapin.

s/sucessfull/successful

>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> ---
>  mm/khugepaged.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index fdc10ffde1ca..57ff287caf6b 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -940,6 +940,11 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm,
>         }
>         vmf.pte--;
>         pte_unmap(vmf.pte);
> +
> +       /* Drain LRU add pagevec to remove extra pin on the swapped in pages */
> +       if (swapped_in)
> +               lru_add_drain();
> +
>         trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 1);
>         return true;
>  }
> --
> 2.26.0


—
Best Regards,
Yan Zi

Download attachment "signature.asc" of type "application/pgp-signature" (855 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ