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: <4f0c30d7-fd10-84c7-4e7f-6d103e4ba9c1@suse.cz>
Date:   Wed, 12 Jan 2022 17:42:07 +0100
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Liam Howlett <liam.howlett@...cle.com>,
        "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     Song Liu <songliubraving@...com>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Rik van Riel <riel@...riel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Michel Lespinasse <walken.cr@...il.com>,
        Jerome Glisse <jglisse@...hat.com>,
        Minchan Kim <minchan@...gle.com>,
        Joel Fernandes <joelaf@...gle.com>,
        Rom Lemarchand <romlem@...gle.com>
Subject: Re: [PATCH v4 20/66] mm/khugepaged: Optimize
 collapse_pte_mapped_thp() by using vma_lookup()

On 12/1/21 15:29, Liam Howlett wrote:
> From: "Liam R. Howlett" <Liam.Howlett@...cle.com>
> 
> vma_lookup() will walk the vma tree once and not continue to look for
> the next vma.  Since the exact vma is checked below, this is a more
> optimal way of searching.
> 
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>

Reviewed-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  mm/khugepaged.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index e99101162f1a..0ff7d72cdd1d 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -1433,7 +1433,7 @@ static int khugepaged_add_pte_mapped_thp(struct mm_struct *mm,
>  void collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr)
>  {
>  	unsigned long haddr = addr & HPAGE_PMD_MASK;
> -	struct vm_area_struct *vma = find_vma(mm, haddr);
> +	struct vm_area_struct *vma = vma_lookup(mm, haddr);
>  	struct page *hpage;
>  	pte_t *start_pte, *pte;
>  	pmd_t *pmd, _pmd;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ