pte_dirty and PG_dirty correspondence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: pte_dirty and PG_dirty correspondence

Hi

I'm working on a project where we need to determine all pages of a process that have been modified within a given interval of time/code. I was hoping to achieve this by somehow making use of the page table dirty flag. But I'm struggling in finding out how the kernel itself makes use of this flag. It seems that in most places the PG_dirty flag of the page structure is used. Is there a mechanism how the kernel synchronizes this flag with the page table?

For my application, I would like to clear all the page table dirty flags at some point, and later on check which pages have been marked dirty by the CPU. Even before this, I could make sure that all the corresponding PG_dirty flags are set, to prevent loss of data. But if the kernel would possibly clear some PG_dirty flags later on, because the pages are not pte_dirty (anymore), that would be harmful.

Can anyone shed some light on how/where the kernel establishes correspondence between the page table and the page struct dirty flag? Or maybe point out another reason why my idea could not work?

Please note that I'm mostly interested in anonymous pages for now. We will probably not be meddling with file-mapped pages.

Thanks a lot!
Joe Schmid


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux