lkml.org 
[lkml]   [2021]   [Jun]   [28]   [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()
    On Thu, Jun 24, 2021 at 07:02:23PM +0100, Matthew Wilcox wrote:
    > > What is the advantage of copying backwards here to start with?
    >
    > Easier to write the loop this way? I suppose we could do it as ...
    >
    > unsigned int i, nr = folio_nr_pages(folio);
    >
    > for (i = 0; i < nr; i++) {
    > /* folio_page() handles discontinuities in memmap */
    > copy_highpage(folio_page(newfolio, i), folio_page(folio, i));
    > cond_resched();
    > }

    I'd prefer that if there is no obvious downside.

    \
     
     \ /
      Last update: 2021-06-28 08:29    [W:2.459 / U:1.556 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site