[<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