lkml.org 
[lkml]   [2021]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2021-06-23 10:38    [W:1.815 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site