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: <45aa3c81-aeee-7e75-aeff-b122a1f6ac44@oracle.com>
Date:   Wed, 9 Feb 2022 11:10:13 -0800
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Muchun Song <songmuchun@...edance.com>, akpm@...ux-foundation.org,
        zi.yan@...rutgers.edu, kirill.shutemov@...ux.intel.com,
        rientjes@...gle.com, lars.persson@...s.com, ziy@...dia.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        duanxiongchun@...edance.com, fam.zheng@...edance.com
Subject: Re: [PATCH v4 5/5] mm: replace multiple dcache flush with
 flush_dcache_folio()

On 2/7/22 23:36, Muchun Song wrote:
> Simplify the code by using flush_dcache_folio().
> 
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
>  mm/migrate.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)

Thanks,

Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
-- 
Mike Kravetz

> 
> diff --git a/mm/migrate.c b/mm/migrate.c
> index c418e8d92b9c..daf2b3508670 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -933,12 +933,8 @@ static int move_to_new_page(struct page *newpage, struct page *page,
>  		if (!PageMappingFlags(page))
>  			page->mapping = NULL;
>  
> -		if (likely(!is_zone_device_page(newpage))) {
> -			int i, nr = compound_nr(newpage);
> -
> -			for (i = 0; i < nr; i++)
> -				flush_dcache_page(newpage + i);
> -		}
> +		if (likely(!is_zone_device_page(newpage)))
> +			flush_dcache_folio(page_folio(newpage));
>  	}
>  out:
>  	return rc;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ