lkml.org 
[lkml]   [2022]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2 2/2] mm: Remember young/dirty bit for page migrations
Date
Peter Xu <peterx@redhat.com> writes:

> On Tue, Aug 09, 2022 at 04:40:12PM +0800, Huang, Ying wrote:
[snip]
>
>> I don't find pte_dirty() is synced to PageDirty() as in
>> try_to_migrate_one(). Is it a issue in the original code?
>
> I think it has? There is:
>
> /* Set the dirty flag on the folio now the pte is gone. */
> if (pte_dirty(pteval))
> folio_mark_dirty(folio);
>

Sorry, my original words are confusing. Yes, there's dirty bit syncing
in try_to_migrate_one(). But I don't find that in migrate_device.c

$ grep dirty mm/migrate_device.c
if (pte_soft_dirty(pte))
swp_pte = pte_swp_mksoft_dirty(swp_pte);
if (pte_swp_soft_dirty(pte))
swp_pte = pte_swp_mksoft_dirty(swp_pte);
entry = pte_mkwrite(pte_mkdirty(entry));

I guess that migrate_device.c is used to migrate between CPU visible
page to CPU un-visible page (device visible), so the rule is different?

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2022-08-10 02:54    [W:0.088 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site