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: <YNLyNJupwcDdj0ZG@infradead.org>
Date:   Wed, 23 Jun 2021 10:35:00 +0200
From:   Christoph Hellwig <hch@...radead.org>
To:     "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc:     akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 20/46] mm/migrate: Add folio_migrate_copy()

> +void folio_migrate_copy(struct folio *newfolio, struct folio *folio)
>  {
> +	unsigned int i = folio_nr_pages(folio) - 1;
>  
> +	copy_highpage(folio_page(newfolio, i), folio_page(folio, i));
> +	while (i-- > 0) {
> +		cond_resched()a
> +		/* folio_page() handles discontinuities in memmap */
> +		copy_highpage(folio_page(newfolio, i), folio_page(folio, i));
> +	}
> +

What is the advantage of copying backwards here to start with?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ